|
@@ -259,6 +259,7 @@ func (d *Door) Key() int {
|
|
|
return d.WaitKey(Inactivity, 0)
|
|
|
}
|
|
|
|
|
|
+// usecs = Microseconds
|
|
|
func (d *Door) WaitKey(secs int64, usecs int64) int {
|
|
|
if d.Disconnected {
|
|
|
return -2
|
|
@@ -268,7 +269,7 @@ func (d *Door) WaitKey(secs int64, usecs int64) int {
|
|
|
return d.GetKey()
|
|
|
}
|
|
|
|
|
|
- timeout := time.Duration(secs)*time.Second + time.Duration(usecs)*time.Millisecond
|
|
|
+ timeout := time.Duration(secs)*time.Second + time.Duration(usecs)*time.Microsecond
|
|
|
|
|
|
select {
|
|
|
case res, ok := <-readerChannel:
|