# Path: pyphysim/util/misc.py
# def pretty_time(time_in_seconds: float) -> str:
#     """
#     Return the time in a more friendly way.
# 
#     Parameters
#     ----------
#     time_in_seconds : float
#         Time in seconds.
# 
#     Returns
#     -------
#     time_string : str
#         Pretty time representation as a string.
# 
#     Examples
#     --------
#     >>> pretty_time(30)
#     '30.00s'
#     >>> pretty_time(76)
#     '1m:16s'
#     >>> pretty_time(4343)
#     '1h:12m:23s'
#     """
#     seconds = time_in_seconds
#     minutes = int(seconds) // 60
#     seconds = int(round(seconds % 60))
# 
#     hours = minutes // 60
#     minutes %= 60
# 
#     if hours > 0:
#         return "%sh:%02dm:%02ds" % (hours, minutes, seconds)
# 
#     if minutes > 0:
#         return "%sm:%02ds" % (minutes, seconds)
# 
#     return "%.2fs" % time_in_seconds


import multiprocessing
import os
import sys
import threading
import time
import warnings
    import zmq
from typing import (Any, List, Literal, Optional, TextIO, Tuple, Union, cast,
                    final)
from ..util.misc import pretty_time
    from IPython.display import display
    from ipywidgets import FloatProgress, HBox, Label
    def finalcount(self) -> int:
        return self._finalcount

    @property
    def display_interval(self) -> float:
        return self._display_interval

    @display_interval.setter
    def display_interval(self, value: float) -> None:
        if value < 0:
            value = 0.0
        self._display_interval = value

    @property
    def elapsed_time_in_seconds(self) -> float:
        if self._finalized is False:
            return time.time() - self._start_time

        return self._stop_time - self._start_time

    @property
    def elapsed_time(self) -> str:
        """
        Get method for the elapsed_time property.

        Returns
        -------
        str
            The elapsed time.
        """

# Path: pyphysim/util/misc.py
# def pretty_time(time_in_seconds: float) -> str:
#     """
#     Return the time in a more friendly way.
# 
#     Parameters
#     ----------
#     time_in_seconds : float
#         Time in seconds.
# 
#     Returns
#     -------
#     time_string : str
#         Pretty time representation as a string.
# 
#     Examples
#     --------
#     >>> pretty_time(30)
#     '30.00s'
#     >>> pretty_time(76)
#     '1m:16s'
#     >>> pretty_time(4343)
#     '1h:12m:23s'
#     """
#     seconds = time_in_seconds
#     minutes = int(seconds) // 60
#     seconds = int(round(seconds % 60))
# 
#     hours = minutes // 60
#     minutes %= 60
# 
#     if hours > 0:
#         return "%sh:%02dm:%02ds" % (hours, minutes, seconds)
# 
#     if minutes > 0:
#         return "%sm:%02ds" % (minutes, seconds)
# 
#     return "%.2fs" % time_in_seconds


# Path: pyphysim/progressbar/progressbar.py
import multiprocessing
import os
import sys
import threading
import time
import warnings
    import zmq
from typing import (Any, List, Literal, Optional, TextIO, Tuple, Union, cast,
                    final)
from ..util.misc import pretty_time
    from IPython.display import display
    from ipywidgets import FloatProgress, HBox, Label

    def finalcount(self) -> int:
        return self._finalcount

    @property
    def display_interval(self) -> float:
        return self._display_interval

    @display_interval.setter
    def display_interval(self, value: float) -> None:
        if value < 0:
            value = 0.0
        self._display_interval = value

    @property
    def elapsed_time_in_seconds(self) -> float:
        if self._finalized is False:
            return time.time() - self._start_time

        return self._stop_time - self._start_time

    @property
    def elapsed_time(self) -> str:
        """
        Get method for the elapsed_time property.

        Returns
        -------
        str
            The elapsed time.
        """

        return pretty_time(self.elapsed_time_in_seconds)