to get a distance i need to measure the time-of-flight of an ultrasonic pulse. a millisecond corresponds to 34 cm which is not accurate enough for my application. is there a way to get down to the microsecond?
thanks for your help!

If your signal arrives in the right way, you can use pulseIn.

If you need something more complicated then maybe you can get by looking at the hardware counters directly. For instance, TCNT0 looks like a variable, but is an 8 bit counter that increments every 64 clock cycles so you get 4 microsecond resolution with it. You need to watch closely to handle overflows.

Your ultrasonics are probably something like 40kHz, so you get a sampling rate of about 6 samples per cycle which should be plenty for recognizing the wave front and sound in air will only move about 1mm in that 4 microsecond interval so you get good resolution. The motion of the air will probably disturb your signal more than that.

i cannot use pulsein() since for a triangulation i have two receivers to check - on value_1 and value_2 to get ta and tb - :

 digitalWrite(ePin, HIGH);
  t = millis();
 while((value_1 < 300) && (value_2 < 300)){
   value_1 = analogRead(analogInput_1);
  value_2 = analogRead(analogInput_2);
 tet = millis() - t; 
 if(value_1 > 300 && value_2 < 300){
    ta = tet;
    else if(value_2 > 300 && value_1 < 300){
      tb = tet;
 while((value_1 < 300) || (value_2 < 300))
   value_2 = analogRead(analogInput_2);
 value_1 = analogRead(analogInput_1);
   tou = millis() - t;
  if(ta == tet){
    tb = tou;
    else if(tb == tet){
      ta = tou;

when ePin is HIGH ultrasound is emitted from the mobile.
i would love to get down to 4 microseconds but i do not know how to use the microcontroller counter TCNT0! can you help?