Hi,
It seems "micros()" is a value generated by the arduino using interrrupts.
--> use interrupts in your PIC24, too.
Or even simpler:
Setup a timer that repeatedly overflows every 2ms.
It just needs to set the interrupt flag .. not even necessary to run an ISR.
In main loop just wait for the Flag to be set, then clear the Flag and run the task.
****
If you need several tasks to be performed with different time intervals:
Find the greatest common divisor and run make the timer to set the flag at this GCD timing.
In main loop run increment a counter every time the flag is set.
Example:
TaskA: 20ms
TaskB: 100us
TaskC: 4ms
--> GCD=100us
TaskA: every 200 ticks
TaskB: every tick
TaskC: every 40 ticks
There are many ways for different requirements.
E.g. ..You may run one or three counters in an ISR...
Klaus