Update of /cvsroot/javanetsim/IceScan/icesockets
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10589/icesockets
Modified Files:
sock_time.h
Log Message:
no message
Index: sock_time.h
===================================================================
RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_time.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sock_time.h 15 Dec 2006 16:35:29 -0000 1.4
--- sock_time.h 15 Dec 2006 21:04:55 -0000 1.5
***************
*** 33,35 ****
--- 33,57 ----
}
+ icestring make_uptime(long t){
+ char buf[1024];
+
+ int msecs = t % (1000*60*60*24);
+
+ int secs = t % (60*60*24);
+
+ int mins = t % (60*24);
+
+ int hours = t%(24);
+
+ int days = t/(1000*60*60*24);
+
+ float fsecs = secs + msecs/1000;
+
+ sprintf(buf, "%d days %d hours %d minutes %f seconds", days, hours, mins, fsecs);
+
+ icestring ret(buf);
+
+ return ret;
+ }
+
#endif
|