libopenfpga/libopenfpgautil/src/openfpga_scale.cpp
/********************************************************************
 * Convert numeric time unit to string
 * e.g. 1e-12 -> ps
 *******************************************************************/
Convert numeric time unit to string
e.g.
Convert numeric time unit to string e . g .
std::string time_unit_to_string(const float& unit) {
  if (1e6 < unit) {
    VTR_LOGF_ERROR(__FILE__, __LINE__,
                   "Invalid time unit %g!\nAcceptable units are [1e6|1e3|1|1e-3|1e-6|1e-9|1e-12|1e-15|1e-18]\n",
                   unit); 
    exit(1);
  }
  return unit_to_string(unit) + std::string("s");
}
std :: string time_unit_to_string ( const float & unit ) { if ( 1e6 < unit ) { VTR_LOGF_ERROR ( __FILE__ , __LINE__ , " \n \n " , unit ) ; exit ( 1 ) ; } return unit_to_string ( unit ) + std :: string ( " " ) ; }
Convert numeric time unit to string
 e.g.
Convert numeric time unit to string e . g .
/* For larger than 1 unit, we do not accept */