Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79692
b: refs/heads/master
c: efd9ac8
h: refs/heads/master
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Ingo Molnar committed Jan 30, 2008
1 parent 460a2f8 commit aaf8ad2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d76c2622813fbc692b0d323028cfef9ee36051a
refs/heads/master: efd9ac8630e89b9ee7ce64008bd7783952374f37
22 changes: 5 additions & 17 deletions trunk/kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,12 @@ static inline s64 __get_nsec_offset(void)
}

/**
* __get_realtime_clock_ts - Returns the time of day in a timespec
* getnstimeofday - Returns the time of day in a timespec
* @ts: pointer to the timespec to be set
*
* Returns the time of day in a timespec. Used by
* do_gettimeofday() and get_realtime_clock_ts().
* Returns the time of day in a timespec.
*/
static inline void __get_realtime_clock_ts(struct timespec *ts)
void getnstimeofday(struct timespec *ts)
{
unsigned long seq;
s64 nsecs;
Expand All @@ -104,30 +103,19 @@ static inline void __get_realtime_clock_ts(struct timespec *ts)
timespec_add_ns(ts, nsecs);
}

/**
* getnstimeofday - Returns the time of day in a timespec
* @ts: pointer to the timespec to be set
*
* Returns the time of day in a timespec.
*/
void getnstimeofday(struct timespec *ts)
{
__get_realtime_clock_ts(ts);
}

EXPORT_SYMBOL(getnstimeofday);

/**
* do_gettimeofday - Returns the time of day in a timeval
* @tv: pointer to the timeval to be set
*
* NOTE: Users should be converted to using get_realtime_clock_ts()
* NOTE: Users should be converted to using getnstimeofday()
*/
void do_gettimeofday(struct timeval *tv)
{
struct timespec now;

__get_realtime_clock_ts(&now);
getnstimeofday(&now);
tv->tv_sec = now.tv_sec;
tv->tv_usec = now.tv_nsec/1000;
}
Expand Down

0 comments on commit aaf8ad2

Please sign in to comment.