Re: Eu time() in C?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Thanks, Rob. I am still confused with the C types...

    Martin

> Try instead:
> 
> > double time_(void)
> > {
> >    return clock()/(double)CLOCKS_PER_SEC;
> > };
> 
> That will give you a floating-point result.
> Your routine will give a result rounded down
> to an integer number of seconds.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu