diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-08-09 08:16:07 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-08-09 08:16:07 +0000 |
commit | a0db75a69e69552f204445bde54314de9498b09f (patch) | |
tree | 6c36685c0b897a90c7d9506957c227415e28a01f /cppe/demo/IceE/throughput/WinCEClient.cpp | |
parent | - IceE now supports datagram, batch datagram and secure modes. (diff) | |
download | ice-a0db75a69e69552f204445bde54314de9498b09f.tar.bz2 ice-a0db75a69e69552f204445bde54314de9498b09f.tar.xz ice-a0db75a69e69552f204445bde54314de9498b09f.zip |
Fix bug with Time. Some minor changes.
Diffstat (limited to 'cppe/demo/IceE/throughput/WinCEClient.cpp')
-rwxr-xr-x | cppe/demo/IceE/throughput/WinCEClient.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
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 |