- struct timeval tv;
- guint32 ret;
-
- ret=gettimeofday (&tv, NULL);
- if(ret==-1) {
- return(0);
- }
-
- /* This is supposed to return milliseconds since reboot but I
- * really can't be bothered to work out the uptime, especially
- * as the 32bit value wraps around every 47 days
- */
- ret=(guint32)((tv.tv_sec * 1000) + (tv.tv_usec / 1000));
-
-#ifdef DEBUG
- g_message ("%s: returning %d", __func__, ret);
-#endif
-
- return(ret);