]> wimlib.net Git - wimlib/blobdiff - src/util.c
More accurate timestamps
[wimlib] / src / util.c
index 8bcfa2028807422302fa543c1c1dcb9c53bd763a..a2a50faa0614d873d8611db6fd4ee3179616d502 100644 (file)
@@ -25,6 +25,8 @@
 #include "wimlib_internal.h"
 #include "endianness.h"
 #include "sha1.h"
+#include "timestamp.h"
+#include <sys/time.h>
 
 
 #include <iconv.h>
@@ -503,3 +505,12 @@ void print_string(const void *string, size_t len)
                p++;
        }
 }
+
+u64 get_wim_timestamp()
+{
+       struct timeval tv;
+       gettimeofday(&tv, NULL);
+       return timeval_to_wim_timestamp(&tv);
+}
+
+