btimer

  1# This file was automatically generated by SWIG (https://www.swig.org).
  2# Version 4.2.1
  3#
  4# Do not make changes to this file unless you know what you are doing - modify
  5# the SWIG interface file instead.
  6
  7from sys import version_info as _swig_python_version_info
  8from mock_rtems import _btimer as _btimer
  9
 10try:
 11    import builtins as __builtin__
 12except ImportError:
 13    import __builtin__
 14
 15def _swig_repr(self):
 16    try:
 17        strthis = "proxy of " + self.this.__repr__()
 18    except __builtin__.Exception:
 19        strthis = ""
 20    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
 21
 22
 23def _swig_setattr_nondynamic_instance_variable(set):
 24    def set_instance_attr(self, name, value):
 25        if name == "this":
 26            set(self, name, value)
 27        elif name == "thisown":
 28            self.this.own(value)
 29        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
 30            set(self, name, value)
 31        else:
 32            raise AttributeError("You cannot add instance attributes to %s" % self)
 33    return set_instance_attr
 34
 35
 36def _swig_setattr_nondynamic_class_variable(set):
 37    def set_class_attr(cls, name, value):
 38        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
 39            set(cls, name, value)
 40        else:
 41            raise AttributeError("You cannot add class attributes to %s" % cls)
 42    return set_class_attr
 43
 44
 45def _swig_add_metaclass(metaclass):
 46    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
 47    def wrapper(cls):
 48        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
 49    return wrapper
 50
 51
 52class _SwigNonDynamicMeta(type):
 53    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
 54    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
 55
 56
 57
 58def benchmark_timer_initialize():
 59    r"""
 60    Initialize the Benchmark Timer
 61
 62    This method initializes the benchmark timer and resets it to begin
 63    counting.
 64    """
 65    return _btimer.benchmark_timer_initialize()
 66
 67def benchmark_timer_read():
 68    r"""
 69    Read the Benchmark Timer
 70
 71    This method stops the benchmark timer and returns the number of
 72    units that have passed since *benchmark_timer_initialize* was invoked.
 73
 74    :rtype: benchmark_timer_t
 75    :return: This method returns the number of units with the average overhead
 76                 removed. If the value is below the minimum trusted value, zero
 77                 is returned.
 78    """
 79    return _btimer.benchmark_timer_read()
 80
 81def benchmark_timer_empty_function():
 82    r"""
 83    Benchmark Timer Empty Function
 84
 85    This method is used to determine loop overhead.
 86    """
 87    return _btimer.benchmark_timer_empty_function()
 88
 89def benchmark_timer_disable_subtracting_average_overhead(find_flag):
 90    r"""
 91    Disable Average Overhead Removal from the Benchmark Timer
 92
 93    This method places the benchmark timer in a "raw" mode where it
 94    returns the actual number of units which have passed between
 95    calls to *benchmark_timer_initialize* and *benchmark_timer_read*
 96    counting.
 97
 98    :type find_flag: boolean, in
 99    :param find_flag: indicates to enable or disable the mode
100    """
101    return _btimer.benchmark_timer_disable_subtracting_average_overhead(find_flag)
def benchmark_timer_initialize():
59def benchmark_timer_initialize():
60    r"""
61    Initialize the Benchmark Timer
62
63    This method initializes the benchmark timer and resets it to begin
64    counting.
65    """
66    return _btimer.benchmark_timer_initialize()

Initialize the Benchmark Timer

This method initializes the benchmark timer and resets it to begin counting.

def benchmark_timer_read():
68def benchmark_timer_read():
69    r"""
70    Read the Benchmark Timer
71
72    This method stops the benchmark timer and returns the number of
73    units that have passed since *benchmark_timer_initialize* was invoked.
74
75    :rtype: benchmark_timer_t
76    :return: This method returns the number of units with the average overhead
77                 removed. If the value is below the minimum trusted value, zero
78                 is returned.
79    """
80    return _btimer.benchmark_timer_read()

Read the Benchmark Timer

This method stops the benchmark timer and returns the number of units that have passed since benchmark_timer_initialize was invoked.

Returns

This method returns the number of units with the average overhead removed. If the value is below the minimum trusted value, zero is returned.

def benchmark_timer_empty_function():
82def benchmark_timer_empty_function():
83    r"""
84    Benchmark Timer Empty Function
85
86    This method is used to determine loop overhead.
87    """
88    return _btimer.benchmark_timer_empty_function()

Benchmark Timer Empty Function

This method is used to determine loop overhead.

def benchmark_timer_disable_subtracting_average_overhead(find_flag):
 90def benchmark_timer_disable_subtracting_average_overhead(find_flag):
 91    r"""
 92    Disable Average Overhead Removal from the Benchmark Timer
 93
 94    This method places the benchmark timer in a "raw" mode where it
 95    returns the actual number of units which have passed between
 96    calls to *benchmark_timer_initialize* and *benchmark_timer_read*
 97    counting.
 98
 99    :type find_flag: boolean, in
100    :param find_flag: indicates to enable or disable the mode
101    """
102    return _btimer.benchmark_timer_disable_subtracting_average_overhead(find_flag)

Disable Average Overhead Removal from the Benchmark Timer

This method places the benchmark timer in a "raw" mode where it returns the actual number of units which have passed between calls to benchmark_timer_initialize and benchmark_timer_read counting.

Parameters
  • find_flag: indicates to enable or disable the mode