def _get_milliseconds_suffix(secs):
    """Return a formatted millisecond suffix, either empty if ms = 0, or dot with 3 digits otherwise.

    :param secs: a unix timestamp (integer or float)
    """
    ms_suffix = ''
    msecs = int(round(secs - int(secs), 3) * 1000)
    if msecs != 0:
        ms_suffix = '.%03i' % msecs
    return ms_suffix
