Class SystemClass has no member named 'millis'

Hi,

I can’t get my sketch to compile when I use: System.millis(); when trying to compile using WebIDE to compile against Particle Electron on a DeviceOS 1.5.2

Following are my code

void setup() {
}


unsigned long last_sync_time;
void loop() {
    last_sync_time = System.millis();
}

I wonder if I forgot to include some headers to get this to work

Have you tried millis() without System.? :wink:

What exactly is the error message?

1 Like

I was able to compile that code for Electron 1.5.2 in the Web IDE. However, System.millis() returns a uint64_t. The error is most likely because the Web IDE is targeting a much older version of Device OS for some reason, not a missing include, which would probably cause a different error.

millis() returns an unsigned long.

1 Like