[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 2845 - trunk/subversion/tests/libsvn_fs

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-08-02 01:58:59 CEST

Philip Martin <philip@codematters.co.uk> writes:

> $ cat z.c
> #include <stdio.h>
> #include <stdlib.h>
> #include <sys/time.h>
>
> int
> main(int argc,
> char *argv[])
> {
> long i = 0;
> while (++i)
> {
> static struct timeval tv, tv2;
> static int flag = 0;
>
> if (gettimeofday(&tv,NULL))
> {
> perror ("gettimeofday failed");
> exit (1);
> }
> if (!flag)
> flag = 1;
> else
> {
> if (tv.tv_usec < tv2.tv_usec && tv.tv_sec <= tv2.tv_sec)
> printf ("%ld: %ld < %ld\n", i, tv.tv_usec, tv2.tv_usec);
> }
> tv2 = tv;
> }
> return EXIT_SUCCESS;
> }
> $ gcc z.c
> $ ./a.out

Whoops, hit send by mistake! Here's what I get on my dual PIII system

$ ./a.out
43043: 374436 < 374437
524931: 904361 < 904362
778682: 184323 < 184324
887643: 304306 < 304307
1014906: 444288 < 444289
1187703: 634262 < 634263
1296827: 754245 < 754246
1315004: 774241 < 774242
1442331: 914224 < 914225
1596600: 84201 < 84202

so yes it goes backwards.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 2 01:59:36 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.