×

Discussion Board

Results 1 to 5 of 5

Thread: Timer query

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    49

    Timer query

    Hi all,
    I am working in S60 5th edition. In my application I need to calculate the time difference between 2 events accurately. The scenario is like this

    Event 1: start the timer
    Event 2: stop the timer and calculate the difference.

    Now I want that even if after event1 the user changes the mobile system time, the difference should be calculated accurately.
    I want to know how I can do it in symbian c++.

    thanks and regards,
    kkc

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,752

    Re: Timer query

    Use an independent time server (on the Internet) then.

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Timer query

    hello kkc_123

    you can note the phones time when timer of your first event starts and then when the Timer stops you can get the phones time again.

    Work out on a difference between them and you will get the difference and as you are calculating based on phoes time no matter if user changes the time.

  4. #4
    Registered User
    Join Date
    Feb 2009
    Posts
    49

    Re: Timer query

    Quote Originally Posted by gaba88 View Post
    hello kkc_123

    you can note the phones time when timer of your first event starts and then when the Timer stops you can get the phones time again.

    Work out on a difference between them and you will get the difference and as you are calculating based on phoes time no matter if user changes the time.

    Hi,
    The user can change the phone's time after event1 and before end of event2. So if I calculate the difference between start of event1 and end of event2 , it will be wrong.

    kkc.

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Timer query

    hello yes that use case i figured out, then you need to get your app sync with some third item what wizard told.

    Regards,

Similar Threads

  1. Timer query
    By kumar_sai123 in forum Symbian
    Replies: 4
    Last Post: 2008-10-23, 07:13
  2. When can you set the screensaver's Refresh Timer Value?
    By azhrei in forum Symbian Tools & SDKs
    Replies: 6
    Last Post: 2008-08-23, 10:12
  3. [Announce] Timer Sample (code)
    By JOM in forum Symbian
    Replies: 5
    Last Post: 2008-06-15, 00:23
  4. Crash with multiple ao_timer
    By noreli in forum Symbian
    Replies: 2
    Last Post: 2007-11-01, 06:18
  5. Timer to a query
    By vaiski79 in forum Symbian
    Replies: 0
    Last Post: 2003-12-03, 12:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×