Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions prometheus_client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import os
import re
import struct
import time
import types
from timeit import default_timer

try:
from BaseHTTPServer import BaseHTTPRequestHandler
Expand All @@ -19,6 +19,7 @@
unicode = str

from threading import Lock
from timeit import default_timer

from .decorator import decorate

Expand Down Expand Up @@ -609,7 +610,7 @@ def set(self, value):

def set_to_current_time(self):
'''Set gauge to the current unixtime.'''
self.set(default_timer())
self.set(time.time())

def track_inprogress(self):
'''Track inprogress blocks of code or functions.
Expand Down