Re: get current time in kernel module
Re: get current time in kernel module
- Subject: Re: get current time in kernel module
- From: Andrew Gallatin <email@hidden>
- Date: Thu, 28 Jul 2005 15:38:01 -0400 (EDT)
Allan Hoeltje writes:
>
>
> "Mike Smith" <email@hidden> wrote on 7/28/05 11:47 AM:
>
> > The kernel has no notion of the "time of day"; it is purely a
> > userland conceit. It's quite possible, common and correct for
> > different parts of the system to have different ideas about the
> > current time of day. The kernel only knows about absolute time.
>
> Then why does my System Log file contain entries from the kernel such as
> this one:
>
> Jul 28 11:00:40 MyMac kernel[0]: AirPort: Link UP:
>
> Maybe I misunderstand your response but it seems to me that there must be
> some way for the kernel to get the "current now" time of day.
I think syslog is recording the time of day that the entry was
received from the kernel and that it bears no relationship to when the
kernel actually generated the message. It may be timestamped,
but if it were, it would be timestamped with time since the epoch, not
the string "Jul 28 11:00:40"
In general, a *nix kernel has no concept of timezones, adjustments for
"daylight saving", etc. It just knows about uptime, and the time
elapsed since the epoch. Translating timestamps is best done by
something in userspace..
Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden