mirror of
https://github.com/drasko/codezero.git
synced 2026-04-17 17:29:04 +02:00
Minor changes on sys_time
A get/set flag determines whether to read or write time.
This commit is contained in:
@@ -99,12 +99,22 @@ void handle_fs_requests(void)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
struct time_info ti;
|
||||
|
||||
printf("\n%s: Started with tid: %d\n", __TASKNAME__, self_tid());
|
||||
|
||||
initialise();
|
||||
|
||||
wait_pager(PAGER_TID);
|
||||
|
||||
if (l4_time(&ti, 0) < 0) {
|
||||
printf("Reading the time has failed.\n");
|
||||
} else {
|
||||
printf("Current time since system started: %u ticks, "
|
||||
"%u seconds, %u minutes, %u hours, %llu days.\n",
|
||||
ti.thz, ti.sec, ti.min, ti.hour, ti.day);
|
||||
}
|
||||
|
||||
printf("%s: Listening requests.\n", __TASKNAME__);
|
||||
while (1) {
|
||||
handle_fs_requests();
|
||||
|
||||
Reference in New Issue
Block a user