• If you like to check the runtime of you code you can use something like this:

    var t1, t2;
    t1 = Date.now()
    //begin code to messure
    a = analogRead(D28);
    // end code to messuere
    t2 = Date.now()
    print("runtime:", t2-t1);
    /* output
    runtime: 0.88500976562
    */
    

    Are this 0.885 mili seconds or 0.885 micro second

    Reference say:

    Get the number of milliseconds elapsed since 1970 (or on embedded platforms, since startu)

    So the difference should be micro seconds. Not shure because a output of Date.now() looks like this 41866529.26635742187.

About

Avatar for MaBe @MaBe started