Re: Using of struct tm in kernel module

Peter Skvarka <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
> But can you explain why that struct is needed inside the kernel? It just
> makes no sense at all to me and I am curious :-)
>
> Of course there *are* parts of the kernel that deal with simmilar structures,
> like drivers for RTC and they use e.g. struct clock_ymdhms and there are
> a few conversion functions for them in src/sys/dev/clock_subr.h, like
> clock_sec_to_ymdhms() which takes seconds and converts it to year, month,
> day, hour, minute and seconds.
Thanks Martin, this is exactly what I need (clock_subr.h), I don't need 
all what struct tm provides,
struct clock_ymdhms is sufficient.

Converting from/to struct clock_ymdhms is used for firing fair usage 
policy event,
which can use weekday or monthday for checking transferred data.
I.e. internet user needs to be notified about transferred data in last week.

Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.