[Gllug] Clock( ) function in C

Tethys . tethys at gmail.com
Tue Sep 20 14:49:51 UTC 2011


On Tue, Sep 20, 2011 at 3:43 PM, dudes dudes <akam123 at hotmail.co.uk> wrote:

> I’m trying to use clock() function (time.h) in milliseconds, but not CPU
> based. For example do something (some codes) for 5 milliseconds and when it
> is exactly 5 millisecond, then exit();

You can't do that with standard Linux. All you can do is say "this
will run for at least 5 milliseconds". If you need precise accuracy,
in that it must be *exactly* 5ms, you need to use one of the realtime
Linux variants.

Tet


-- 
"Java is a DSL for taking large XML files and converting them to stack
traces" -- Bulat Shakirzyanov
--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list