Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / September 2005



Tip: Looking for answers? Try searching our database.

timer under carbon

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
patate - 19 Sep 2005 18:42 GMT
Hello

I can't find how to create a timer under carbon.
What i need is something in milliseconds ( the equivalent of CreateTimer
under windows )

Any help appreciated.
thank you
pat
Chris Baum - 19 Sep 2005 19:12 GMT
> I can't find how to create a timer under carbon.

InstallEventLoopTimer
patate - 19 Sep 2005 19:15 GMT
> InstallEventLoopTimer

It's in seconds, i'm looking for something in milliseconds or more.

pat.
Scott Ribe - 19 Sep 2005 19:42 GMT
> It's in seconds, i'm looking for something in milliseconds or more.

Note that the argument is a float, not an int--that threw me off too at
first.
patate - 19 Sep 2005 20:05 GMT
>> It's in seconds, i'm looking for something in milliseconds or more.
>
> Note that the argument is a float, not an int--that threw me off too at
> first.

Haa great, awesome, works like a charm.

Thanks a lot.
pat.
larry@skytag.com - 20 Sep 2005 18:03 GMT
Wouldn't it have been easier, faster, and less trouble for everyone if
you'd just spend a few seconds looking at the declarations in the
headers? Do you really need a mailing list to understand this:

extern OSStatus
InstallEventLoopTimer(
 EventLoopRef         inEventLoop,
 EventTimerInterval   inFireDelay,
 EventTimerInterval   inInterval,
 EventLoopTimerUPP    inTimerProc,
 void *               inTimerData,
 EventLoopTimerRef *  outTimer);

typedef double     EventTime;
typedef EventTime  EventTimeout;
typedef EventTime  EventTimerInterval;

Or did you not know what a "double" was?

Larry
(who can't understand why so many programmers think not reading
anything is a good way to save time)
patate - 21 Sep 2005 16:33 GMT
Did you realise that every post you make in this group is an angry post ?  i
am really sorry that you have a sad life. Just go do some volunteer work or
something, you'll see that asking a question in a newsgroup isn't that much
trouble for everyone as you think. ( compared to the real trouble that's out
there, in the real world )

pat.

> Wouldn't it have been easier, faster, and less trouble for everyone if
> you'd just spend a few seconds looking at the declarations in the
[quoted text clipped - 18 lines]
> (who can't understand why so many programmers think not reading
> anything is a good way to save time)
larry@skytag.com - 21 Sep 2005 23:13 GMT
Sorry, but I just don't have much respect for people who are trying to
write code without bothering to take the time to figure out what
they're doing. They save time (or so they perceive) and then they go
running to mailing lists when they don't understand something they
*would* have understood if they'd spent, in some cases, even one minute
researching it.

Mailing lists like this are great for getting help with tricky stuff,
but to use them in place of acquiring a knowledge of the technologies
you're using is misusing mailing lists IMO. When you read
documentation, you get a broader understanding of a technology. When
you read the headers you find APIs and constants you didn't know
existed and that you may be able to use one day. When you come to a
mailing list, you generally get little more than the answer to a
specific question, and in the long run that's not nearly as good as the
broader understanding you get from taking time to study things out for
yourself.

Larry
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.