How to get time

Login to reply to this topic.
Fri, 2005-08-19 13:16
Joined: 2005-07-14
Forum posts: 55
Hi
i am developing a time based game.
I wanna know how do i get time from system??
What i want to do is get the time when i start the game and store it.
Again I will keep calculating the Time in every timer cycle and will subtract the stored value from it to get time elapsed.
But how can i implement this in symbian.
I am a biginner in symbian, i have the concepts but i dont know how do i implement it in symbian.
I m sure some one somowhere must have developed a time based game.
So plsss help Huh

Fri, 2005-08-19 13:20
Joined: 2005-02-11
Forum posts: 214
Re: How to get time
Code:
TTime time;
time.HomeTime();

"I only know that I know nothing." (Socrates)

Sat, 2005-08-20 07:17
Joined: 2005-07-14
Forum posts: 55
Re: How to get time
hey riho thnx. It works.
Now tell me one thing!!! I wanna display this as digits. I know the way but tell me the font name that will make it look like a digit on a digital clock.
Anyone any idea??? which font to use to display time in digital format just as in a digital clock
M sure its there in Symbian. It must be. plss tell me the name of font through which i can do this...
Mon, 2005-11-14 00:59
Joined: 2005-11-14
Forum posts: 5
Re: How to get time
i'm doing the same thing as nits, but found that the symbian timer is kinda crappy (can only be triggered 64 times a second) and consequently i will render a frame, but when i determine time elapsed, it is often 0... ie. no time has elapsed

i'd love to think that i'm such an efficient programmer that i've somehow found a way to have a frame rendered in only a few cpu commands, but i doubt i have

is there a way to get more accurate time?

how is desiredFPS / realFPS determined on symbian games?

Tue, 2005-11-15 17:02
Joined: 2004-11-29
Forum posts: 1271
Re: How to get time
I'm sorry, but on pre-9.0 symbian, there really isn't any better timer then the 1/64s one...

If you want more accurate fps count, you'd have to measure time over more frames to to distribute the error...

On later symbian, you have a High resolution timer too, that will give you better resolution. And on the 9.1 hw I have worked with, I actually got ms resolution from TTime::HomeTime() Smiley

But on older symbians... Sorry, but you have to live with it.
  • Login to reply to this topic.