I'm working on a project to modify the scheduler in MINIX 3. So to test it I need to analyse the wait time and turnaround time. To calculate the wait time I'm storing the system time when the process becomes ready initially (t1) and when the process is first alloted a time quantum (t2). So t2 - t1 gives the wait time.
But in MINIX I can't find a way to get precision better than time in seconds. I tired clock_gettime() function, returning time from the CLOCK_MONOTONIC clock but CLOCK_MONOTONIC doesn't exist in MINIX.
Also the shell command "date +%s%N" gives time in nanoseconds in linux but in MINIX "%N" option doesn't exist.
Is there a way to get the system time in milliseconds on better precision in Minix? Or is there another way to calculate wait time of processes without getting system time?