pike.git / lib / modules / Calendar.pmod / Time.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Time.pmod:1953:    len_s/3600,(len_s/60)%60,    len_s%60,len_ns/1000000);    if (len_s>=60)    return sprintf("%d:%02d.%03d",    len_s/60,len_s%60,len_ns/1000000);    if (len_s || len_ns>inano/1000)    return sprintf("%d.%06d",    len_s,len_ns/1000);    return sprintf("0.%09d",len_ns);    } +  +  float fraction_no() +  { +  return ns / 1e9;    } -  + }      //------------------------------------------------------------------------   // global convinience functions   //------------------------------------------------------------------------      //! method TimeofDay now()   //! Give the zero-length time period of the   //! current time.      TimeofDay now()