Repository URL to install this package:
|
Version:
3.0.176 ▾
|
tvault-contego-common
/
home
/
tvault
/
.virtenv
/
lib
/
python2.7
/
site-packages
/
kombu
/
utils
/
time.py
|
|---|
"""Time Utilities."""
from __future__ import absolute_import, unicode_literals
__all__ = ['maybe_s_to_ms']
def maybe_s_to_ms(v):
# type: (Optional[Union[int, float]]) -> int
"""Convert seconds to milliseconds, but return None for None."""
return int(float(v) * 1000.0) if v is not None else v