Calculating elapsed time in OnTimer callees

Post comments about Shareaza code and discuss with other developers.
Forum rules
Home | Wiki | Rules

Calculating elapsed time in OnTimer callees

Postby siavoshkc » 09 Mar 2010 13:51

siavoshkc
 
Posts: 347
Joined: 02 Nov 2009 09:37

Re: Calculating elapsed time in OnTimer callees

Postby raspopov » 11 Mar 2010 04:33

Prove it on real Shareaza code.
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Calculating elapsed time in OnTimer callees

Postby ailurophobe » 14 Mar 2010 18:21

I don't know about Shareaza, but usually that is done because a single timer is used to trigger multiple events. The timer calls the callbacks and only the ones that actually are elapsed execute. This used to be common since timers used to be expensive in terms of system resources. I'd assume that relatively speaking they still are.
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Calculating elapsed time in OnTimer callees

Postby siavoshkc » 15 Mar 2010 09:22

I'll do it to Scheduler.

[EDIT]
I did it.

Caller is responsible to not to call a function too soon.
siavoshkc
 
Posts: 347
Joined: 02 Nov 2009 09:37


Return to Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest