Date: Tue, 01 Mar 2022 14:45:08 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 262273] Subsuquent Calls to clock_gettime(CLOCK_THREAD_CPUTIME_ID,... ) return time in the past Message-ID: <bug-262273-227-8c5CA6imwK@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-262273-227@https.bugs.freebsd.org/bugzilla/> References: <bug-262273-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262273 --- Comment #4 from firk@cantconnect.ru --- I can't reproduce this (but that's not on Ryzen) Try this #include <stdio.h> #include <sys/time.h> int main(void) { struct timespec before, after; clockid_t cid; if(clock_getcpuclockid2(0, CPUCLOCK_WHICH_TID, &cid)<0) return -1; while (1) { clock_gettime(cid, &before); clock_gettime(cid, &after); printf("before: %lu:%lu after %lu:%lu\n", before.tv_sec, before.tv_nsec, after.tv_sec, after.tv_nsec); if (after.tv_nsec < before.tv_nsec) return -1; } } same problem? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262273-227-8c5CA6imwK>