On Tuesday, 14 May 2013 at 03:50:22 UTC, Josh wrote:
Is there a way in D to only accept input for a certain time,
instead of std.stdio.readln's behaviour? Something like "Press
a key in 3 seconds to abort".
see also this thread:
http://forum.dlang.org/thread/vavskrvzebozkreub...@forum.dlang.or
On 05/13/2013 09:22 PM, Josh wrote:
> Your answer requires the user to
> press enter to send the line. Would it be possible to have getch-like
> behaviour without using C, or would that be the only way?
I don't know how to set stdin to non-blocking mode in D.
However, if you are sure that stdin
On Tuesday, 14 May 2013 at 04:14:27 UTC, Ali Çehreli wrote:
On 05/13/2013 08:50 PM, Josh wrote:
Is there a way in D to only accept input for a certain time,
instead of
std.stdio.readln's behaviour? Something like "Press a key in 3
seconds
to abort".
Thanks
Josh
An unlikely solution is std.
On 05/13/2013 08:50 PM, Josh wrote:
Is there a way in D to only accept input for a certain time, instead of
std.stdio.readln's behaviour? Something like "Press a key in 3 seconds
to abort".
Thanks
Josh
An unlikely solution is std.concurrency because it already has a timeout
facility:
impor
Is there a way in D to only accept input for a certain time,
instead of std.stdio.readln's behaviour? Something like "Press a
key in 3 seconds to abort".
Thanks
Josh