tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Replace time_second with time_uptime in some places



Hi,

Some codes in sys/net* use time_second to
manage time periods such as cache expirations.
However, time_second doesn't increase monotonically
and can leap by say settimeofday(2) according to
time_second(9). We should use time_uptime
instead of it to avoid such time leaps.

http://www.netbsd.org/~ozaki-r/use-time_uptime.diff

This patch replaces time_second with time_uptime.
Additionally it converts a time based on time_uptime
to a time based on time_second when the kernel passes
the time to userland programs that expect the latter,
and vice versa.

Any comments?

Regards,
  ozaki-r


Home | Main Index | Thread Index | Old Index