Hi all,

I have written simple programme which gets system time. I get syscall errors when programm is calling gettimeofday function:

*main.c:*

   #include <time.h>
   #include <sys/time.h>
   #include <stdlib.h>
   #include <stdio.h>

   int main(int argc, char *argv[]) {
   int iterations = 1000000;

   struct timeval start, end;

   gettimeofday(&start, NULL);

   for (int i = 0; i < iterations; i++)
   {
   }

   gettimeofday(&end, NULL);

   printf("%ld\n", ((end.tv_sec * 1000000 + end.tv_usec)
            - (start.tv_sec * 1000000 + start.tv_usec)));

   return 0;

*Errors:*

   libsel4muslcsys: Error attempting syscall 263
   libsel4muslcsys: Error attempting syscall 78

Could you tell me where I mistook?

--
Best regards,
Rinat Dobrokhotov

_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel

Reply via email to