Expose Duration units and add a Nanoseconds function to let us build against 0.6.0

This commit is contained in:
Ben Moran
2017-06-08 12:01:11 +01:00
parent 98b5ed837b
commit fbc1767475
2 changed files with 12 additions and 2 deletions

View File

@@ -1688,7 +1688,7 @@ cdef class _Timer:
return self
cpdef after_delay(self, time) except +reraise_kj_exception:
return _VoidPromise()._init(self.thisptr.afterDelay(capnp.Duration(time)))
return _VoidPromise()._init(self.thisptr.afterDelay(capnp.Nanoseconds(time)))
def getTimer():
return _Timer()._init(helpers.getTimer(C_DEFAULT_EVENT_LOOP_GETTER().thisptr))