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>2015-01-31 17:57:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-01-31 18:00:08 +0300
commitf90891d87e351ef1c9509007a18dc72ee5025809 (patch)
tree11038eaf4249531fbd698d7312168abd5a4a719a /source/blender/blenlib/intern/time.c
parent9e9cd77b8de68015a98659671272cc9d78710e69 (diff)
Add PIL_check_seconds_timer_i to avoid casting
note, win32 casts still casts from double.
Diffstat (limited to 'source/blender/blenlib/intern/time.c')
-rw-r--r--source/blender/blenlib/intern/time.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/time.c b/source/blender/blenlib/intern/time.c
index 078fc2c295b..3a20d3ee920 100644
--- a/source/blender/blenlib/intern/time.c
+++ b/source/blender/blenlib/intern/time.c
@@ -70,6 +70,11 @@ double PIL_check_seconds_timer(void)
}
}
+long int PIL_check_seconds_timer_i(void)
+{
+ return (long int)PIL_check_seconds_timer();
+}
+
void PIL_sleep_ms(int ms)
{
Sleep(ms);
@@ -90,6 +95,16 @@ double PIL_check_seconds_timer(void)
return ((double) tv.tv_sec + tv.tv_usec / 1000000.0);
}
+long int PIL_check_seconds_timer_i(void)
+{
+ struct timeval tv;
+ struct timezone tz;
+
+ gettimeofday(&tv, &tz);
+
+ return tv.tv_sec;
+}
+
void PIL_sleep_ms(int ms)
{
if (ms >= 1000) {