def time(): return cgpt.time() - t0
# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # import cgpt import gpt t0 = cgpt.time() def time(): return cgpt.time() - t0 class timer_component: def __init__(self): self.dt_sum = 0.0 self.dt_max = None self.dt_min = None self.dt_last = None self.flop_sum = None self.flop_per_sec_max = None