40 Hz Square wave with 8kHz tone

Is there a a similar function to millis() that uses microseconds?