def time_to_ssmmm(time_value):
    """
    Format the given time value into a ``SS.mmm`` string.

    Examples: ::

        12        => 12.000
        12.345    => 12.345
        12.345432 => 12.345
        12.345678 => 12.346

    :param float time_value: a time value, in seconds
    :rtype: string
    """
    if time_value is None:
        time_value = 0
    return "%.3f" % (time_value)