diff options
Diffstat (limited to 'cppe')
-rwxr-xr-x | cppe/demo/IceE/latency/WinCEClient.cpp | 3 | ||||
-rwxr-xr-x | cppe/demo/IceE/throughput/WinCEClient.cpp | 29 | ||||
-rw-r--r-- | cppe/src/IceE/Time.cpp | 2 |
3 files changed, 16 insertions, 18 deletions
diff --git a/cppe/demo/IceE/latency/WinCEClient.cpp b/cppe/demo/IceE/latency/WinCEClient.cpp index b82339e947f..f64dc51ebc1 100755 --- a/cppe/demo/IceE/latency/WinCEClient.cpp +++ b/cppe/demo/IceE/latency/WinCEClient.cpp @@ -75,8 +75,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmd if(!RegisterClass(&wc)) { - MessageBox(NULL, L"Window Registration Failed!", L"Error!", - MB_ICONEXCLAMATION | MB_OK); + MessageBox(NULL, L"Window Registration Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } diff --git a/cppe/demo/IceE/throughput/WinCEClient.cpp b/cppe/demo/IceE/throughput/WinCEClient.cpp index 47f9f763083..9b45418d332 100755 --- a/cppe/demo/IceE/throughput/WinCEClient.cpp +++ b/cppe/demo/IceE/throughput/WinCEClient.cpp @@ -75,8 +75,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmd if(!RegisterClass(&wc)) { - MessageBox(NULL, L"Window Registration Failed!", L"Error!", - MB_ICONEXCLAMATION | MB_OK); + MessageBox(NULL, L"Window Registration Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } @@ -380,7 +379,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmd } tm = IceUtil::Time::now() - tm; - wsprintf(buf, L"\r\ntime for %d sequences: %fms\r\ntime per sequence: %fms\r\n", + wsprintf(buf, L"\r\ntime for %d sequences: %.04fms\r\ntime per sequence: %.04fms\r\n", repetitions, tm.toMilliSecondsDouble(), tm.toMilliSecondsDouble() / repetitions); ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)buf); @@ -414,23 +413,13 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmd { mbit *= 2; } - wsprintf(buf, L"throughput: %f MBit/s\r\n", mbit); + wsprintf(buf, L"throughput: %.04f MBit/s\r\n", mbit); ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)buf); } } - ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, - (LPARAM)L"\r\nThroughput tests completed\r\n"); + ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)L"\r\nThroughput tests completed\r\n"); - // - // Run the message pump. - // - MSG Msg; - while(GetMessage(&Msg, NULL, 0, 0) > 0) - { - TranslateMessage(&Msg); - DispatchMessage(&Msg); - } } catch(const Ice::Exception& ex) { @@ -442,6 +431,16 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmd status = EXIT_FAILURE; } + // + // Run the message pump. + // + MSG Msg; + while(GetMessage(&Msg, NULL, 0, 0) > 0) + { + TranslateMessage(&Msg); + DispatchMessage(&Msg); + } + if(communicator) { try diff --git a/cppe/src/IceE/Time.cpp b/cppe/src/IceE/Time.cpp index 15497a1f608..a42ac3fa963 100644 --- a/cppe/src/IceE/Time.cpp +++ b/cppe/src/IceE/Time.cpp @@ -35,7 +35,7 @@ IceUtil::Time::now() // absolute time on CE since GetLocalTime doesn't have millisecond // resolution. // - return Time(GetTickCount() * 1000); + return Time(static_cast<Int64>(GetTickCount()) * 1000); #elif defined(_WIN32) struct _timeb tb; _ftime(&tb); |