Arduino Compile error with NXPMotionsense example elaspsedMIcros

Im trying to compile any of the NXPMotionsense 9dofmpu examples with the arduino IDE. I get the following error when ever I attempt a compile:

"The specific Error NXPMotionSense.cpp:229:9: error: 'elapsedMicros' does not name a type"

There is an "elaspedmillis" library but no "elapsedmicro" library.

Ive wiped out Arduino15 in AppData, Ive installed a new IDE, Ive downloaded the newest nxpmotionsense library GitHub - PaulStoffregen/NXPMotionSense: NXP Motion Sensors for Teensy and Arduino.

Nothing seems to stop this error Ive tried to comping as due,nano and mega.

Whats missing that causes this error? Does anyone know how to compile this on arduino ide ? Im trying to use this (Adafruit_FXAS21002C) because my Mpu9250 was so inaccurate, prone to intermittent drifting and tough to calibrate.

See the code below:

    // Full orientation sensing using NXP's advanced sensor fusion algorithm.
    //
    // You *must* perform a magnetic calibration before this code will work.
    //
    // To view this data, use the Arduino Serial Monitor to watch the
    // scrolling angles, or run the OrientationVisualiser example in Processing.

    #include <NXPMotionSense.h>
    #include <Wire.h>
    #include <EEPROM.h>
    NXPMotionSense imu;
    NXPSensorFusion filter;
    static elapsedMicros usec_since;
    void setup() {
      Serial.begin(9600);
      imu.begin();
      filter.begin(100);
    }

    void loop() {
      float ax, ay, az;
      float gx, gy, gz;
      float mx, my, mz;
      float roll, pitch, heading;

      if (imu.available()) {
        // Read the motion sensors
        imu.readMotionSensor(ax, ay, az, gx, gy, gz, mx, my, mz);

        // Update the SensorFusion filter
        filter.update(gx, gy, gz, ax, ay, az, mx, my, mz);

        // print the heading, pitch and roll
        roll = filter.getRoll();
        pitch = filter.getPitch();
        heading = filter.getYaw();
        Serial.print("Orientation: ");
        Serial.print(heading);
        Serial.print(" ");
        Serial.print(pitch);
        Serial.print(" ");
        Serial.println(roll);
      }
    }

You could just try commenting out this line:

static elapsedMicros usec_since

since usec_since doesn't actually seem to be used in the sketch.

When I did that this error came up... I dont see this anywhere ??????

\Arduino\libraries\NXPMotionSense\NXPMotionSense.cpp:55:9: error: 'elapsedMillis' does not name a type

You can download an elapsedMillis library from here:

Thanks !

I had already added it to the sketch.. but once I added it to the .cpp file in the library things started working.

Again Thank you!