[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: time function
On Wed, 2007-08-01 at 14:25 +0100, hari krishna angadi wrote:
> hi all,
> i am porting user code to kernel code.time() functions is
> used which prints the time in seconds.i want the respective call in
> kernel ?
Here is how you figure it out:
- time() is a system call. In general, if you have a system call foo(),
the corresponding function in the kernel will be named sys_foo(). In
this case, search the kernel sources for sys_time().
- sys_time() basically just calls do_gettimeofday(), and then returns
the information to the user.
There is your answer - use do_gettimeofday().
Avishay
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ