def ts_to_ns(ts):
    """
    Convert second timestamp to integer nanosecond timestamp
    """
    # XXX Due to limited mantis in float numbers,
    # do not multiply directly by 1e9
    return int(int(ts * 1e6) * int(1e3))