TimeNow( )

back to FEHUtility

Description

This function returns a floating point time since the Proteus was turned on. Please note that the register that this value is obtained from has the potential to overflow, so please only utilize this function relatively. This function is similar to the time(NULL) function in C.

Syntax

.TimeNow()

Parameters

None.

Returns

The amount of time in seconds that the Proteus has been on for. The value is a floating point number.

Examples

#include <FEHUtility.h>

#include <FEHLCD.h>

int main(void)
{
    //Write "Hello World" to screen every 5.25 seconds indefinitely
    for(;;)
    {
        float t_now;
        t_now = TimeNow();
        while(TimeNow()-t_now<5.25);
        LCD.WriteLine("Hello World");
    }   
}