Public Member Functions | Private Attributes | List of all members
grpc_testing._time.StrictFakeTime Class Reference
Inheritance diagram for grpc_testing._time.StrictFakeTime:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, time)
 
def call_at (self, behavior, time)
 
def call_in (self, behavior, delay)
 
def sleep_for (self, duration)
 
def sleep_until (self, time)
 
def time (self)
 

Private Attributes

 _state
 
 _time
 

Detailed Description

Definition at line 191 of file _time.py.

Constructor & Destructor Documentation

◆ __init__()

def grpc_testing._time.StrictFakeTime.__init__ (   self,
  time 
)

Definition at line 193 of file _time.py.

Member Function Documentation

◆ call_at()

def grpc_testing._time.StrictFakeTime.call_at (   self,
  behavior,
  time 
)
Adds a behavior to be called at a specific time.

Args:
  behavior: A behavior to be called with no arguments.
  time: The test time at which to call the behavior.

Returns:
  A grpc.Future with which the call of the behavior may be cancelled
    before it is executed.

Reimplemented from grpc_testing.Time.

Definition at line 209 of file _time.py.

◆ call_in()

def grpc_testing._time.StrictFakeTime.call_in (   self,
  behavior,
  delay 
)
Adds a behavior to be called after some time.

Args:
  behavior: A behavior to be called with no arguments.
  delay: A duration of time in seconds after which to call the behavior.

Returns:
  A grpc.Future with which the call of the behavior may be cancelled
    before it is executed.

Reimplemented from grpc_testing.Time.

Definition at line 200 of file _time.py.

◆ sleep_for()

def grpc_testing._time.StrictFakeTime.sleep_for (   self,
  duration 
)
Blocks for some length of test time.

Args:
  duration: A duration of test time in seconds for which to block.

Reimplemented from grpc_testing.Time.

Definition at line 217 of file _time.py.

◆ sleep_until()

def grpc_testing._time.StrictFakeTime.sleep_until (   self,
  time 
)
Blocks until some test time.

Args:
  time: The test time until which to block.

Reimplemented from grpc_testing.Time.

Definition at line 224 of file _time.py.

◆ time()

def grpc_testing._time.StrictFakeTime.time (   self)
Accesses the current test time.

Returns:
  The current test time (over which this object has authority).

Reimplemented from grpc_testing.Time.

Definition at line 197 of file _time.py.

Member Data Documentation

◆ _state

grpc_testing._time.StrictFakeTime._state
private

Definition at line 194 of file _time.py.

◆ _time

grpc_testing._time.StrictFakeTime._time
private

Definition at line 195 of file _time.py.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:40