Delay() and millis()

Are there equivalents of the Arduino delay() and millis() functions that we can use with the Pokitto?

I found pokWaitms() and pokGetTime() here:

but only got errors trying to use them:

Error: Undefined symbol pokGetTime() (referred from main.LPC11U68.o).
Error: Undefined symbol pokWaitms(unsigned short) (referred from main.LPC11U68.o).
1 Like

There are two function in core library and they are both public functions
static uint32_t getTime();
static void wait(uint16_t);

1 Like

Excellent - thank you! :grinning:

1 Like

I’ve been using the following to add a delay to my main loop…

        // timing loop
        while(game.getTime()-tempTime < myDelay){
            refreshDisplay();
        };
        tempTime = game.getTime();

I didn’t realize there was a wait() function :stuck_out_tongue:

2 Likes

Once upon a time I started to write keyboard function for pokitto. After 1 hour I found pokitto already have keyboard function in core library :smile:

2 Likes

I’m still using the same. Found some problem to add correct reference to use wait.