Skip to content

weird timing issue on firefox using time() #7

@teadrinker

Description

@teadrinker

I found that my intro was not working as expected in firefox, so I created this to plot the difference:

#define IMPORT(MODULE, NAME) __attribute__((import_module(MODULE), import_name(NAME)))

IMPORT("env", "time")                extern float time();
IMPORT("env", "setPixel")            extern void setPixel(int, int, int); 

static int realframe = 0;
void upd() {

    float t = time();
    int frame = (int)(t * 60.f);
    setPixel(realframe, frame, 15);
    realframe++;
}

chrome:
chrome_23-09-12__01-17-00

firefox:
firefox_23-09-12__01-17-19

It looks like dropped frames, however surely (for this case) not because of performance issues in the cart...
Not really sure what is going on here...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions