Main Page | Directories | File List | Globals

time.c

Go to the documentation of this file.
00001 /*
00002  * kernel_sys/time.c
00003  *
00004  * Copyright (c) 2003-2004 Lukasz Dembinski <dembol@nasa.com.pl>
00005  * All Rights Reserved
00006  * 
00007  * Date:        2004/09
00008  * Author:      Lukasz Dembinski
00009  * Info:        time.c core file
00010  * Contact:     mailto: <dembol@nasa.com.pl>
00011  *
00012  */
00013 
00014 #include <agnix/agnix.h>
00015 #include <agnix/timer.h>
00016 
00017 int do_sys_time(int *secs)
00018 {
00019     struct timeval_s tv;
00020 
00021     timer_gettimeofday(&tv);
00022     *secs = tv.tv_sec;
00023     
00024     return tv.tv_sec;
00025 }
00026 
00027 int do_sys_stime(int *secs)
00028 {
00029     struct timeval_s tv;
00030 
00031     tv.tv_sec = *secs;
00032     timer_settimeofday(&tv);
00033     
00034     return 0;
00035 }
00036 
Dokumentacje wygenerowano programem Doxygen 1.4.2 dla projektu Agnix