Latest attempt at changeid.
[ira/wip.git] / source3 / printing / nt_printing.c
index d1ab5ce21d1abb2778948b0a8b000701ae153c53..608ba9f21ff43eb61c49849555e4b6138f3d1731 100644 (file)
@@ -2651,10 +2651,11 @@ void get_printer_subst_params(int snum, fstring *printername, fstring *sharename
 
 static uint32 rev_changeid(void)
 {
-       static time_t start_time;
-       if (start_time == 0)
-               start_time = time(NULL);
-       return (((time(NULL) - start_time)+1)*1000);
+       struct timeval tv;
+
+       get_process_uptime(&tv);
+       /* This value is in ms * 100 */
+       return (tv.tv_sec * 100000) + (tv.tv_usec / 10);
 }
 
 /*