git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6454
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxStopWatch sw;
printf("Sleeping 3 seconds...");
wxSleep(3);
wxStopWatch sw;
printf("Sleeping 3 seconds...");
wxSleep(3);
- printf("\telapsed time: %ld\n", sw.Time());
+ printf("\telapsed time: %ldms\n", sw.Time());
sw.Pause();
printf("Sleeping 2 more seconds...");
wxSleep(2);
sw.Pause();
printf("Sleeping 2 more seconds...");
wxSleep(2);
- printf("\telapsed time: %ld\n", sw.Time());
+ printf("\telapsed time: %ldms\n", sw.Time());
sw.Resume();
printf("And 3 more seconds...");
wxSleep(3);
sw.Resume();
printf("And 3 more seconds...");
wxSleep(3);
- printf("\telapsed time: %ld\n", sw.Time());
+ printf("\telapsed time: %ldms\n", sw.Time());
+
+ wxStopWatch sw2;
+ puts("\nChecking for 'backwards clock' bug...");
+ for ( size_t n = 0; n < 70; n++ )
+ {
+ sw2.Start();
+ if ( sw.Time() < 0 || sw2.Time() < 0 )
+ {
+ puts("\ntime is negative - ERROR!");
+ }
+
+ putchar('.');
+ }
+
+ puts(", ok.");