On 2011-06-03 15:02, Jonathan M Davis wrote:
> Incidentally, this use case shows that I should probably add overloads for
> some of the basic math functions for Duration...
I'm an idiot. I was thinking that min and max were in std.math and specific to
built-in types, but we were smarter than that
On 6/6/11, Steven Schveighoffer wrote:
> Then, you have a function that sets the bool and signals the condition:
>
> void endProgram()
> {
> synchronized(mutex)
> {
>if(engineActive)
>{
>engineActive = false;
>cond.notifyAll();
>}
> }
> }
On Fri, 03 Jun 2011 17:37:40 -0400, Andrej Mitrovic
wrote:
On 6/3/11, Jonathan M Davis wrote:
Generally, you'd just put it to sleep for the period of time that you
want
to
wait for. The only reason that I see to keep waking it up is if it
could be
interrupted and effectively told to
On 2011-06-04 11:14, Andrej Mitrovic wrote:
> Hey, so is there a reason I'm not allowed to use immutable here:
>
> immutable finalTime = Clock.currTime + dur!"seconds"(5);
>
> Error: cannot implicitly convert expression
> (currTime(cast(immutable(TimeZone))opCall()).opBinary(dur(5L))) of
> type S
Hey, so is there a reason I'm not allowed to use immutable here:
immutable finalTime = Clock.currTime + dur!"seconds"(5);
Error: cannot implicitly convert expression
(currTime(cast(immutable(TimeZone))opCall()).opBinary(dur(5L))) of
type SysTime to immutable(SysTime)
I didn't even think about issue #1. Thanks again!
On 2011-06-03 14:37, Andrej Mitrovic wrote:
> On 6/3/11, Jonathan M Davis wrote:
> > Generally, you'd just put it to sleep for the period of time that you
> > want to
> > wait for. The only reason that I see to keep waking it up is if it could
> > be interrupted and effectively told to wake up - i
On 6/3/11, Jonathan M Davis wrote:
>
> Generally, you'd just put it to sleep for the period of time that you want
> to
> wait for. The only reason that I see to keep waking it up is if it could be
> interrupted and effectively told to wake up - in which case you would be
> sleeping and waking up o
On 2011-06-03 14:22, Andrej Mitrovic wrote:
> I can't find any timers in phobos, basically I want some loop to run for a
> predetermined amount of time. Currently I use this:
>
> import core.time;
> import std.datetime;
> import core.thread;
>
> void main()
> {
> auto finalTime = Clock.currTime +
I can't find any timers in phobos, basically I want some loop to run for a
predetermined amount of time. Currently I use this:
import core.time;
import std.datetime;
import core.thread;
void main()
{
auto finalTime = Clock.currTime + dur!"seconds"(4);
while (true)
{
Thre
10 matches
Mail list logo