sim: clocked object: function for converting cycles to ticks.
This commit is contained in:
parent
759fe30d9f
commit
c58bee829f
1 changed files with 2 additions and 0 deletions
|
@ -215,6 +215,8 @@ class Clocked
|
|||
inline Cycles ticksToCycles(Tick t) const
|
||||
{ return Cycles(divCeil(t, clockPeriod())); }
|
||||
|
||||
inline Tick cyclesToTicks(Cycles c) const
|
||||
{ return clockPeriod() * c; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue