aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2024-02-29 01:50:44 +0100
committerPaul Oliver <contact@pauloliver.dev>2024-02-29 01:50:44 +0100
commit3f5fc698284c5fee0e46b1b3b15a8c74325ac1fe (patch)
tree7e65937b2bae00fa677aa5d37557bbfe90d9ca11
parent0072819204d1f6ed04fbeb102291c97f0ee9c650 (diff)
Autosave now generates new files.
-rw-r--r--.gitignore1
-rw-r--r--tsalis/src/tsalis.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index b7b88bd..6f3afd4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,5 @@
*.d
*.o
*.sim
+*.auto
*.exe
diff --git a/tsalis/src/tsalis.c b/tsalis/src/tsalis.c
index 81c9a3d..6840a02 100644
--- a/tsalis/src/tsalis.c
+++ b/tsalis/src/tsalis.c
@@ -87,7 +87,9 @@ exec(void)
s_cycle();
if (g_autoSaveInterval && !(s_getCycle() % g_autoSaveInterval)) {
- s_save(g_simName);
+ char extendedName[NAME_MAX_SIZE + 28];
+ sprintf(extendedName, "%s.%010u.%010u.auto", g_simName, s_getEpoch(), s_getCycle());
+ s_save(extendedName);
}
end = clock();