[wpdev-commits] wolfpack console_win.cpp,1.17,1.18
Brought to you by:
rip,
thiagocorrea
|
From: <co...@us...> - 2003-10-29 14:30:11
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv9575
Modified Files:
console_win.cpp
Log Message:
Fixed uptime format
Index: console_win.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console_win.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** console_win.cpp 13 Oct 2003 00:11:47 -0000 1.17
--- console_win.cpp 29 Oct 2003 14:30:08 -0000 1.18
***************
*** 264,268 ****
lblUptime = CreateWindow( "STATIC", 0, WS_CHILD|WS_VISIBLE, 400, 15, 250, 25, hwnd, 0, appInstance, 0 );
-
// Set up our timer to refresh the nice Uptime Counter
uptimeTimer = SetTimer( NULL, 0, 500, 0 );
--- 264,267 ----
***************
*** 509,513 ****
{
char message[512];
! sprintf( message, "Uptime: %02u:%02u:%02u", ( uiCurrentTime / 1000 / 3600 ), ( uiCurrentTime / 1000 / 60 ) % 60, ( uiCurrentTime / 1000 ) % 3600 );
SetWindowText( lblUptime, message );
}
--- 508,519 ----
{
char message[512];
!
! unsigned int msecs, seconds, minutes, hours, days;
! days = uiCurrentTime / 86400000;
! hours = (uiCurrentTime % 86400000) / 3600000;
! minutes = (( uiCurrentTime % 86400000 ) % 3600000 ) / 60000;
! seconds = ((( uiCurrentTime % 86400000 ) % 3600000 ) % 60000 ) / 1000;
!
! sprintf( message, "Uptime: %u:%02u:%02u:%02u", days, hours, minutes, seconds );
SetWindowText( lblUptime, message );
}
|