Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17600
b: refs/heads/master
c: d1c0b8f
h: refs/heads/master
v: v3
  • Loading branch information
Matt Helsley authored and Linus Torvalds committed Jan 10, 2006
1 parent 7f16c62 commit 1b7cf45
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 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: caf3c9dc56f5758ca6016513e2790a151bf2077d
refs/heads/master: d1c0b8f835aeba85aa428aaec6d521ef4639c7fa
1 change: 0 additions & 1 deletion trunk/include/linux/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ extern int do_setitimer(int which, struct itimerval *value,
struct itimerval *ovalue);
extern int do_getitimer(int which, struct itimerval *value);
extern void getnstimeofday(struct timespec *tv);
extern void getnstimestamp(struct timespec *ts);

extern struct timespec timespec_trunc(struct timespec t, unsigned gran);

Expand Down
22 changes: 0 additions & 22 deletions trunk/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,28 +564,6 @@ void getnstimeofday(struct timespec *tv)
EXPORT_SYMBOL_GPL(getnstimeofday);
#endif

void getnstimestamp(struct timespec *ts)
{
unsigned int seq;
struct timespec wall2mono;

/* synchronize with settimeofday() changes */
do {
seq = read_seqbegin(&xtime_lock);
getnstimeofday(ts);
wall2mono = wall_to_monotonic;
} while(unlikely(read_seqretry(&xtime_lock, seq)));

/* adjust to monotonicaly-increasing values */
ts->tv_sec += wall2mono.tv_sec;
ts->tv_nsec += wall2mono.tv_nsec;
while (unlikely(ts->tv_nsec >= NSEC_PER_SEC)) {
ts->tv_nsec -= NSEC_PER_SEC;
ts->tv_sec++;
}
}
EXPORT_SYMBOL_GPL(getnstimestamp);

/* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
* Assumes input in normal date format, i.e. 1980-12-31 23:59:59
* => year=1980, mon=12, day=31, hour=23, min=59, sec=59.
Expand Down

0 comments on commit 1b7cf45

Please sign in to comment.