Time::getCurrentTime() problem

Hi forum,

I have a question about the juce::Time class, especially the static getCurrentTime routine.

Is it normal that I always get the same output from it during the execution of my program?

When I print out
Time::getCurrentTime().toString(true, true, true, true) at the beginning of the main function, and at the end (which could be minutes later), I always get the same time. Shouldn’t the current time get updated?

I’m using version 1.51


If that method was broken then no apps would run at all. But you say “your main function”, so my guess is that you’ve probably just not initialised the library properly, or something simple like that.

Ok, thanks for the reply. If I do the same thing in one of the example projects, the time is displayed correctly. So I must be making a mistake in including the juce lib to my project. The odd thing is that everything else works fine (using other juce classes). I’ll figure it out.

I didn’t call initialiseJuce_NonGUI(); from my application. Now the getCurrentTime() method returns the current time! There is still an offset, but i’ll figure it out.