annotate osdep/gettimeofday.c @ 10578:b9d289fd8a57

10000l, the old code was slow as hell, copying stuff extra times and actually broken -- blanking the whole screen at each 'page flip' with -dr enabled. benchmarks: before: 56% cpu for decode 56% cpu for vo with no -dr 25% cpu for vo with -dr after: 56% cpu for decode 25% cpu for vo without -dr 0% cpu for vo with -dr if vo_fbdev is going to do pageflip, it needs to do it for REAL, using vertical scroll registers (like g2), not copying a temp buffer (which will shear anyway and is super-slow).
author rfelker
date Tue, 12 Aug 2003 08:24:24 +0000
parents 5c639ec8c39e
children 08cac43f1e38
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9834
5c639ec8c39e Unbreak
rguyom
parents: 9829
diff changeset
1 #include "../config.h"
9829
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
2
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
3 #ifndef HAVE_GETTIMEOFDAY
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
4 #include <sys/time.h>
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
5 #include <sys/timeb.h>
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
6 void gettimeofday(struct timeval* t,void* timezone)
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
7 { struct timeb timebuffer;
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
8 ftime( &timebuffer );
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
9 t->tv_sec=timebuffer.time;
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
10 t->tv_usec=1000*timebuffer.millitm;
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
11 }
0f2cc9ef24f6 gettimeofday() emulation using ftime()
faust3
parents:
diff changeset
12 #endif