import struct
import time


def push_timestamp(msg: bytes) -> bytes:
    """ This prepends a timestamp returned by python's time.time() as a double
    to the buffer specified by msg."""
    now = struct.pack('d', time.time())
    return msg + now