ich habe in PB Funktionen eingebunden, mit denen ich Zeitmessungen durchführen kann...
Code: Alles auswählen
[...]
CompilerCase #PB_OS_Linux
;Clock-ID's = Type of clock to use
#CLOCK_REALTIME = 0
#CLOCK_MONOTONIC = 1
#CLOCK_PROCESS_CPUTIME_ID = 2
#CLOCK_THREAD_CPUTIME_ID = 3
#CLOCK_REALTIME_HR = 4
#CLOCK_MONOTONIC_HR = 5
Structure timespec
tv_sec.???
tv_nsec.l
EndStructure
ImportC ""
clock_getres.i(clock_id.i, *res.timespec)
clock_gettime.i(clock_id.i, *tp.timespec)
EndImport
[...]
Code: Alles auswählen
struct timespec
{
time_t tv_sec; /* seconds *
long tv_nsec; /* nanoseconds *
}
viele Grüße,
SBond