Commit b41c0b55 authored by augustin_s's avatar augustin_s 🐍
Browse files

added a process time

parent d4fcf243
from random import random
from time import sleep
from .adjustable import Adjustable
class DummyAdjustable(Adjustable):
def __init__(self, initial_value=0, jitter=False, ID="DUMMY", name="Dummy", units=None):
def __init__(self, initial_value=0, jitter=False, process_time=0, ID="DUMMY", name="Dummy", units=None):
super().__init__(ID, name=name, units=units)
self._current_value = initial_value
self._jitter = jitter
self._process_time = process_time
def get_current_value(self):
value = self._current_value
......@@ -17,6 +19,7 @@ class DummyAdjustable(Adjustable):
return value
def set_target_value(self, value):
sleep(self._process_time)
self._current_value = value
print(repr(self))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment