Q: time related functions

Strolch
Posts: 10
Joined: Fri Oct 24, 2014 7:22 pm

Q: time related functions

Postby Strolch » Fri Nov 14, 2014 12:17 am

The user_interface.h declares "uint32 system_get_time(void)".
Does the function return time in seconds? Related to which time?
Is a reverse function (system_set_time) available?
Is a global "ticks since (re)start" variable available?

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: Q: time related functions

Postby costaud » Fri Nov 14, 2014 12:43 am

Strolch wrote:The user_interface.h declares "uint32 system_get_time(void)".
Does the function return time in seconds? Related to which time?
Is a reverse function (system_set_time) available?
Is a global "ticks since (re)start" variable available?

Hey Strolch, this func returns a time counted in microsecond.It is read from a loop counter and is related to the time the chip is powered on. Usually,it is used to get an time interval and will re-count when the chip is reset.

nicoverduin
Posts: 3
Joined: Sat Oct 25, 2014 2:06 pm

Re: Q: time related functions

Postby nicoverduin » Fri Nov 14, 2014 1:17 am

a bit like millis() on the arduino?

Strolch
Posts: 10
Joined: Fri Oct 24, 2014 7:22 pm

Re: Q: time related functions

Postby Strolch » Fri Nov 14, 2014 2:58 am

Thanks, costaud.
So I guess I have to manage my own time/date ('cause the os doesn't have one)?
F.e. query NTP on startup and maintain an own timer counting the sec/millisec for time/date...

Who is online

Users browsing this forum: No registered users and 4 guests