On Tuesday, 25 August 2020 at 18:42:53 UTC, codic wrote:
I'd like to be able to change the callback of a vibe.d Timer
(eg created with
http://vibe-core.dpldocs.info/v1.9.3/vibe.core.core.createTimer.html) after creation, something like:
auto timer = createTimer();
timer.rearm(dur
On Tuesday, 25 August 2020 at 18:42:53 UTC, codic wrote:
I'd like to be able to change the callback of a vibe.d Timer
(eg created with
http://vibe-core.dpldocs.info/v1.9.3/vibe.core.core.createTimer.html) after creation, something like:
auto timer = createTimer();
timer.rearm(dur
I'd like to be able to change the callback of a vibe.d Timer (eg
created with
http://vibe-core.dpldocs.info/v1.9.3/vibe.core.core.createTimer.html) after creation, something like:
auto timer = createTimer();
timer.rearm(duration, /*...*/);
timer.callback = delegate {
// things
On Wednesday, 6 February 2019 at 05:17:51 UTC, Heromyth wrote:
On Wednesday, 6 February 2019 at 05:03:26 UTC, Sudhi wrote:
Hi All,
I am trying to use an Async task which would run at every
interval of time.
I could not find any example for this. Can some one enlighten
me on this. I did not
On Wednesday, 6 February 2019 at 05:03:26 UTC, Sudhi wrote:
Hi All,
I am trying to use an Async task which would run at every
interval of time.
I could not find any example for this. Can some one enlighten
me on this. I did not find much documentation on timers also.
Thanks,
Sudhi
Here i
Hi All,
I am trying to use an Async task which would run at every
interval of time.
I could not find any example for this. Can some one enlighten me
on this. I did not find much documentation on timers also.
Thanks,
Sudhi
On Thursday, 18 January 2018 at 10:03:57 UTC, drug wrote:
18.01.2018 08:45, Andres Clari пишет:
I see, then although it works (or it may work) on release
shouldn't that assert happen for release builds by default
too? Or is the thought that you got the error running the
debug build you shoul
18.01.2018 08:45, Andres Clari пишет:
I see, then although it works (or it may work) on release shouldn't that
assert happen for release builds by default too? Or is the thought that
you got the error running the debug build you should do it a different
way on your own and skip the check all
On Tuesday, 16 January 2018 at 09:04:18 UTC, Sönke Ludwig wrote:
Am 10.01.2018 um 15:40 schrieb Andres Clari:
Hi, I have an app that uses vibe tasks, fibers and timers
extensively, and I found an issue only for debug builds, when
canceling a timer. However the code in question works just
fine
Am 10.01.2018 um 15:40 schrieb Andres Clari:
Hi, I have an app that uses vibe tasks, fibers and timers extensively,
and I found an issue only for debug builds, when canceling a timer.
However the code in question works just fine in the release build.
But having this here makes testing certain
Hi, I have an app that uses vibe tasks, fibers and timers
extensively, and I found an issue only for debug builds, when
canceling a timer. However the code in question works just fine
in the release build.
But having this here makes testing certain things in my program a
pain, since it
On Wednesday, 22 June 2016 at 01:31:17 UTC, Adam D. Ruppe wrote:
On Tuesday, 21 June 2016 at 23:15:58 UTC, Joerg Joergonson
wrote:
Does D have a timer?
You could make one with threads or timeouts, or event loop and
GUI libraries have one.
Like simpledisplay.d has a Timer class
http
On Tuesday, 21 June 2016 at 23:15:58 UTC, Joerg Joergonson wrote:
Does D have a timer?
You could make one with threads or timeouts, or event loop and
GUI libraries have one.
Like simpledisplay.d has a Timer class
http://dpldocs.info/experimental-docs/arsd.simpledisplay.Timer.html and i
Does D have a timer? I've tried some user code and it doesn't
work. I need to be able to have a delegate called periodically.
(fiber or thread, doesn't matter)
https://github.com/Dav1dde/BraLa/blob/master/brala/utils/thread.d
module lib.mTimer;
private
{
im
On Monday, 17 February 2014 at 12:03:39 UTC, Dejan Lekic wrote:
On Monday, 17 February 2014 at 11:08:16 UTC, Chris wrote:
The D way of implementing a timer? I need to (automatically)
execute a function that performs a clean up, say every hour.
if (file.older than 1 hour) {
remove;
}
Here
On Monday, 17 February 2014 at 11:08:16 UTC, Chris wrote:
The D way of implementing a timer? I need to (automatically)
execute a function that performs a clean up, say every hour.
if (file.older than 1 hour) {
remove;
}
Here is a quick timer implementation that you can improve
yourself
Am 17.02.2014 12:20, schrieb Chris:
> On Monday, 17 February 2014 at 11:11:06 UTC, simendsjo wrote:
>> On Monday, 17 February 2014 at 11:08:16 UTC, Chris wrote:
>>> The D way of implementing a timer? I need to (automatically) execute
>>> a function that performs
On Monday, 17 February 2014 at 11:20:05 UTC, Chris wrote:
On Monday, 17 February 2014 at 11:11:06 UTC, simendsjo wrote:
On Monday, 17 February 2014 at 11:08:16 UTC, Chris wrote:
The D way of implementing a timer? I need to (automatically)
execute a function that performs a clean up, say every
On Monday, 17 February 2014 at 11:20:05 UTC, Chris wrote:
On Monday, 17 February 2014 at 11:11:06 UTC, simendsjo wrote:
On Monday, 17 February 2014 at 11:08:16 UTC, Chris wrote:
The D way of implementing a timer? I need to (automatically)
execute a function that performs a clean up, say every
On Monday, 17 February 2014 at 11:11:06 UTC, simendsjo wrote:
On Monday, 17 February 2014 at 11:08:16 UTC, Chris wrote:
The D way of implementing a timer? I need to (automatically)
execute a function that performs a clean up, say every hour.
if (file.older than 1 hour) {
remove;
}
Vibe.d
On Monday, 17 February 2014 at 11:08:16 UTC, Chris wrote:
The D way of implementing a timer? I need to (automatically)
execute a function that performs a clean up, say every hour.
if (file.older than 1 hour) {
remove;
}
Vibe.d can be used for this to get an OS agnostic solution.
Haven
The D way of implementing a timer? I need to (automatically)
execute a function that performs a clean up, say every hour.
if (file.older than 1 hour) {
remove;
}
Am 26.02.2013 14:19, schrieb bearophile:
> David:
>
>> Not sure what you mean, but I have a pretty solid Timer implementation
>> (Threaded)
>>
>> https://github.com/Dav1dde/BraLa/blob/master/brala/utils/thread.d
>>
>> The file has no dependencies, so co
David:
Not sure what you mean, but I have a pretty solid Timer
implementation
(Threaded)
https://github.com/Dav1dde/BraLa/blob/master/brala/utils/thread.d
The file has no dependencies, so copy it over and have fun.
License of
the whole application is GPLv3, but if you need it relicensed
On Sunday, 10 February 2013 at 14:49:15 UTC, SaltySugar wrote:
Can i do my own timer in D console application?
like in C# timer_Tick event.
I have also created one. Please, see here:
https://bitbucket.org/heromyth/dtoolkit/src/a8b5f8874e3d82373b71a2ca5c9f02a73362b56a/toolkit/System/Timer.d?at
Am 10.02.2013 15:49, schrieb SaltySugar:
> Can i do my own timer in D console application?
> like in C# timer_Tick event.
Not sure what you mean, but I have a pretty solid Timer implementation
(Threaded)
https://github.com/Dav1dde/BraLa/blob/master/brala/utils/thread.d
The file
On Sunday, 10 February 2013 at 14:49:15 UTC, SaltySugar wrote:
Can i do my own timer in D console application?
like in C# timer_Tick event.
There is no Timer in D as you know it from C# and also there are
no events. You must rely on SetTimer WinAPI and write your own
TimerProc.
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
On 01/25/2010 04:02 PM, strtr wrote:
Stanislav Blinov Wrote:
Pelle M�nsson wrote:
I'm in need for a timer library that measures the acutal time. I have
tried std.c.time's clock(), but it only measures time spent inside the
program, not actual time elapsed.
I need at least m
Lars T. Kyllingstad Wrote:
> It's not undocumented, it's just badly linked-to. :)
>
> http://www.digitalmars.com/d/2.0/phobos/std_perf.html
>
> -Lars
http://www.digitalmars.com/d/1.0/phobos/std_perf.html
strtr wrote:
Stanislav Blinov Wrote:
Pelle M幩sson wrote:
I'm in need for a timer library that measures the acutal time. I have
tried std.c.time's clock(), but it only measures time spent inside the
program, not actual time elapsed.
I need at least millisecond resolution, so std.c
Stanislav Blinov Wrote:
> Pelle Månsson wrote:
> > I'm in need for a timer library that measures the acutal time. I have
> > tried std.c.time's clock(), but it only measures time spent inside the
> > program, not actual time elapsed.
> >
> >
Pelle Månsson wrote:
I'm in need for a timer library that measures the acutal time. I have
tried std.c.time's clock(), but it only measures time spent inside the
program, not actual time elapsed.
I need at least millisecond resolution, so std.c.time.time() is not an
option.
I
I'm in need for a timer library that measures the acutal time. I have
tried std.c.time's clock(), but it only measures time spent inside the
program, not actual time elapsed.
I need at least millisecond resolution, so std.c.time.time() is not an
option.
I wonder, is there a good l
Sam Hu wrote:
Thank you both so much.
In DFL there is a Timer class but I can not get it work:
It compiled but just print 2 lines of message:
Before timer ...
After timer...
I am asking Chris Miller on DFL forum regarding this issue.
In DWT,there is a Runnable class I think it can gain the same
Thank you both so much.
In DFL there is a Timer class but I can not get it work:
module dflTimer;
import dfl.all;
import tango.io.Stdout;
class LetterPerSecond
{
private:
Timer timer;
static int counter;
static char[] displayString;
void writeChar(Timer sender,EventArgs ea
Steve Schveighoffer wrote:
e.g.:
import tango.time.Clock;
...
auto curTime = Clock.now;
auto period = TimeSpan.fromMilliseconds(300);
auto nextTime = curTime + period;
for(int counter=0;;counter++)
{
Stdout(displayString[counter%displayString.length]).flush;
auto timeToSleep = nextTime - curT
On Tue, 03 Mar 2009 23:10:07 -0500, Sam Hu wrote:
> First of all,this is about D ,not C#. In C# the program print each
> letter of a string per 0.3 second one by one using the Timer & delegate:
> C# code:
> using System;
> using System.Text;
> using System.Timers;
>
&
First of all,this is about D ,not C#.
In C# the program print each letter of a string per 0.3 second one by one using
the Timer & delegate:
C# code:
using System;
using System.Text;
using System.Timers;
namespace OneLetterATime
{
class Program
{
static int counter
48 matches
Mail list logo