Thread: RPM calculator
View Single Post
  #20   Spotlight this post!  
Unread 02-03-2012, 14:43
Brian Selle's Avatar
Brian Selle Brian Selle is offline
Mentor
FRC #3310 (Black Hawk Robotics)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Texas
Posts: 165
Brian Selle has a spectacular aura aboutBrian Selle has a spectacular aura aboutBrian Selle has a spectacular aura about
Re: RPM calculator

Excellent! In the WPILib I just found:

Timer.java

/**
* Return the system clock time in seconds. Return the time from the
* FPGA hardware clock in seconds since the FPGA started.
*
* @return Robot running time in seconds.
*/
public static double getFPGATimestamp() {
return Utility.getFPGATime() / 1000000.0;
}

Utility.java

/**
* Read the microsecond timer from the FPGA.
*
* @return The current time in microseconds according to the FPGA.
*/
public static long getFPGATime() {
return tGlobal.readLocalTime();
}

Thanks!
Reply With Quote