Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's part of the response I wrote last time this came up (https://news.ycombinator.com/item?id=8602494):

An approach where you watch the clock will be inherently less portable and actually much harder. Not only will the timing calls be hardware or OS specific, but so will the worst-case time. Imagine having to deal with a chip going into low power mode during your computation. Also you probably don't want to count time that your thread wasn't scheduled to run, so now you're talking about integrating with the scheduler.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: