+static void update_stampfile(Timer *t, usec_t timestamp) {
+ _cleanup_close_ int fd = -1;
+
+ mkdir_parents_label(t->stamp_path, 0755);
+
+ /* Update the file atime + mtime, if we can */
+ fd = open(t->stamp_path, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
+ if (fd >= 0) {
+ struct timespec ts[2];
+
+ timespec_store(&ts[0], timestamp);
+ ts[1] = ts[0];
+
+ futimens(fd, ts);
+ }
+}
+