task. h
uint32_t xTaskGetTickCountFromISR( void );
This is a version of millis() that is safe to be called from an ISR - provided that uint32_t is the natural word size of the microcontroller being used or interrupt nesting is either not supported or not being used.