RE: [PHP-CVS] cvs: php4 /win32 time.c

2001-02-09 Thread repe
The purpose of the static variable is to keep the time when high performance counters were started. (This appears to be at boot time.) This is a one time initialization job, no harm should appear even in a multi thread environment. When initialization is done (only once per process), then funct

RE: [PHP-CVS] cvs: php4 /win32 time.c

2001-02-05 Thread Andi Gutmans
Does this variable need to be a true global? If it does then it has to be mutexed. Having said that if two threads want to change it and you think it doesn't really matter which one will "win" then you can probably live without the mutex. Andi At 10:35 AM 2/5/2001 +, James Moore wrote: >

RE: [PHP-CVS] cvs: php4 /win32 time.c

2001-02-05 Thread James Moore
> I don't think you should be using static variables in the > functions. Don't > forget that you might have more than one thread accessing this > function at > a time (unless you came to the conclusion that a race here can't > do any harm). I dont think race conditions here will do any real harm

Re: [PHP-CVS] cvs: php4 /win32 time.c

2001-02-04 Thread Andi Gutmans
I don't think you should be using static variables in the functions. Don't forget that you might have more than one thread accessing this function at a time (unless you came to the conclusion that a race here can't do any harm). Andi At 03:52 PM 2/4/2001 +, James Moore wrote: >jmoore

RE: [PHP-CVS] cvs: php4 /win32 time.c

2001-02-04 Thread James Moore
This patch reduces accuracy to milliseconds rather than microseconds but the results are actaully accurate rather than before where the time was collected in two function calls (so seconds would be out of sync with the number of microseconds). Some acuraccy has been lost but the function actually