Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-05-12 19:13:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-12 19:13:06 +0400
commitbddc7dfc20919105e02181340d54b2faf52c95ac (patch)
tree1000cce34ce4cd97c87862fcd576d32f0711a0fa /source/blender/blenlib/intern/time.c
parent2f2b15bbb2a30ee312d65c627d54a12445f4b987 (diff)
style cleanup: remaining BLI files.
Diffstat (limited to 'source/blender/blenlib/intern/time.c')
-rw-r--r--source/blender/blenlib/intern/time.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/blenlib/intern/time.c b/source/blender/blenlib/intern/time.c
index 2f53aa38e77..64f007513ed 100644
--- a/source/blender/blenlib/intern/time.c
+++ b/source/blender/blenlib/intern/time.c
@@ -37,35 +37,35 @@
double PIL_check_seconds_timer(void)
{
- static int hasperfcounter= -1; /* -1==unknown */
+ static int hasperfcounter = -1; /* -1==unknown */
static double perffreq;
- if (hasperfcounter==-1) {
+ if (hasperfcounter == -1) {
__int64 ifreq;
- hasperfcounter= QueryPerformanceFrequency((LARGE_INTEGER*) &ifreq);
- perffreq= (double) ifreq;
+ hasperfcounter = QueryPerformanceFrequency((LARGE_INTEGER *) &ifreq);
+ perffreq = (double) ifreq;
}
if (hasperfcounter) {
__int64 count;
- QueryPerformanceCounter((LARGE_INTEGER*) &count);
+ QueryPerformanceCounter((LARGE_INTEGER *) &count);
- return count/perffreq;
+ return count / perffreq;
}
else {
- static double accum= 0.0;
- static int ltick= 0;
- int ntick= GetTickCount();
+ static double accum = 0.0;
+ static int ltick = 0;
+ int ntick = GetTickCount();
- if (ntick<ltick) {
- accum+= (0xFFFFFFFF-ltick+ntick)/1000.0;
+ if (ntick < ltick) {
+ accum += (0xFFFFFFFF - ltick + ntick) / 1000.0;
}
else {
- accum+= (ntick-ltick)/1000.0;
+ accum += (ntick - ltick) / 1000.0;
}
- ltick= ntick;
+ ltick = ntick;
return accum;
}
}
@@ -87,17 +87,17 @@ double PIL_check_seconds_timer(void)
gettimeofday(&tv, &tz);
- return ((double) tv.tv_sec + tv.tv_usec/1000000.0);
+ return ((double) tv.tv_sec + tv.tv_usec / 1000000.0);
}
void PIL_sleep_ms(int ms)
{
- if (ms>=1000) {
- sleep(ms/1000);
- ms= (ms%1000);
+ if (ms >= 1000) {
+ sleep(ms / 1000);
+ ms = (ms % 1000);
}
- usleep(ms*1000);
+ usleep(ms * 1000);
}
#endif