diff options
author | José Fonseca <[email protected]> | 2012-12-05 08:59:21 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-12-06 17:12:31 +0000 |
commit | d296326e065ed9685bd27d62a3ba20d8a8996e6f (patch) | |
tree | fd199ddabb848056e1f03df7d275ea272f8a4f1a /src/gallium/auxiliary/os/os_time.h | |
parent | 7e14293556bf8b4248728d2952752c13f70647f3 (diff) |
gallium/os: Cleanup up os_time_get/os_time_get_nano.
- Re-implement os_time_get in terms of os_time_get_nano() for consistency
- Use CLOCK_MONOTONIC as recommended
- Only use clock_gettime on Linux for now.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/os/os_time.h')
-rw-r--r-- | src/gallium/auxiliary/os/os_time.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/os/os_time.h b/src/gallium/auxiliary/os/os_time.h index 54101a1f546..517de9b0474 100644 --- a/src/gallium/auxiliary/os/os_time.h +++ b/src/gallium/auxiliary/os/os_time.h @@ -51,17 +51,19 @@ extern "C" { /* - * Get the current time in microseconds from an unknown base. + * Get the current time in nanoseconds from an unknown base. */ int64_t -os_time_get(void); +os_time_get_nano(void); /* - * Get the current time in nanoseconds from an unknown base. + * Get the current time in microseconds from an unknown base. */ -uint64_t -os_time_get_nano(void); +static INLINE int64_t +os_time_get(void) { + return os_time_get_nano() * 1000; +} /* |