import time


def now(_reactor=None):
    """Get the time, using reactor.seconds or time.time"""
    if _reactor and hasattr(_reactor, "seconds"):
        return _reactor.seconds()
    else:
        return time.time()