Re: Multitasking in Mac OS Gets 100% CPU

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...
jimcbrown said...

I think this was done back when we supported DOS so we could sleep for fractional seconds from DOS apps...

So, if you're actually calling to nanosleep, you could pass that fraction directly to it, correct?

-Greg

Yes, we could. (Technically, we'd have to convert it to a set of integer values, one of which representing the micro/nanosecond value, and then pass that in - but same difference.) And in theory we'd have to busy-wait if we wanted to be able to sleep any leftover fractional value - but at such a low range, I doubt busy-waiting would make much of a difference anyways.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu