]> git.stg.codes - stg.git/blobdiff - include/stg/utime.h
Merge branch 'stg-2.409' into stg-2.409-radius
[stg.git] / include / stg / utime.h
index 20da4e432a7081b73c7cf131ed5e1c0642957f24..853b3db194c7d91c875c5ef40d07024424cf198f 100644 (file)
@@ -46,7 +46,7 @@ struct UTIME: public timeval
     tv_usec = 0;
     }
 
-    UTIME(time_t t)
+    explicit UTIME(time_t t)
     {
     tv_sec = t;
     tv_usec = 0;
@@ -164,6 +164,11 @@ struct UTIME: public timeval
     {
     return tv_usec;
     }
+
+    double AsDouble() const
+    {
+    return tv_sec + tv_usec * 1e-6;
+    }
 };