Re: Convert TickDuration to Duration?

2011-06-09 Thread Steven Schveighoffer
On Wed, 08 Jun 2011 18:02:40 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 2011-06-08 14:30, David Nadlinger wrote: On 6/8/11 11:14 PM, Jonathan M Davis wrote: On 2011-06-08 13:36, David Nadlinger wrote: Did I miss a way to convert a TickDuration to a Duration? If there really is

Re: Convert TickDuration to Duration?

2011-06-09 Thread simendsjo
On 09.06.2011 16:33, Steven Schveighoffer wrote: On Wed, 08 Jun 2011 18:02:40 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 2011-06-08 14:30, David Nadlinger wrote: On 6/8/11 11:14 PM, Jonathan M Davis wrote: On 2011-06-08 13:36, David Nadlinger wrote: Did I miss a way to convert a

Re: Convert TickDuration to Duration?

2011-06-09 Thread Jonathan M Davis
On 2011-06-09 08:18, simendsjo wrote: On 09.06.2011 16:33, Steven Schveighoffer wrote: On Wed, 08 Jun 2011 18:02:40 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 2011-06-08 14:30, David Nadlinger wrote: On 6/8/11 11:14 PM, Jonathan M Davis wrote: On 2011-06-08 13:36, David

Re: Convert TickDuration to Duration?

2011-06-09 Thread Steven Schveighoffer
On Thu, 09 Jun 2011 13:33:28 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 09.06.2011 16:33, Steven Schveighoffer wrote: Hm... this involves cast(Duration)x? That seems like a dangerous thing for a common operation, no? There's nothing dangerous about it. It's an overloaded

Re: Convert TickDuration to Duration?

2011-06-09 Thread Andrej Mitrovic
On 6/9/11, Steven Schveighoffer schvei...@yahoo.com wrote: What I mean is, whenever you use the blunt instrument 'cast' anything can happen. This code: cast(x)y; can do a lot of damage, depending on what x and y are. This was on my mind since I've seen it in std.datetime, and I agree.

Re: Convert TickDuration to Duration?

2011-06-09 Thread Jonathan M Davis
On 2011-06-09 10:58, Steven Schveighoffer wrote: On Thu, 09 Jun 2011 13:33:28 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 09.06.2011 16:33, Steven Schveighoffer wrote: Hm... this involves cast(Duration)x? That seems like a dangerous thing for a common operation, no?

Convert TickDuration to Duration?

2011-06-08 Thread David Nadlinger
Did I miss a way to convert a TickDuration to a Duration? If there really is none, is there a reason for this? Having to do an immediate conversion to a hnsecs long feels somehow odd: --- Duration maxFlushInterval; if (dur!hnsecs(flushTimer.peek.hnsecs) maxFlushInterval) { … } --- David

Re: Convert TickDuration to Duration?

2011-06-08 Thread Jonathan M Davis
On 2011-06-08 13:36, David Nadlinger wrote: Did I miss a way to convert a TickDuration to a Duration? If there really is none, is there a reason for this? Having to do an immediate conversion to a hnsecs long feels somehow odd: --- Duration maxFlushInterval; if

Re: Convert TickDuration to Duration?

2011-06-08 Thread David Nadlinger
On 6/8/11 11:14 PM, Jonathan M Davis wrote: On 2011-06-08 13:36, David Nadlinger wrote: Did I miss a way to convert a TickDuration to a Duration? If there really is none, is there a reason for this? Having to do an immediate conversion to a hnsecs long feels somehow odd: --- Duration

Re: Convert TickDuration to Duration?

2011-06-08 Thread Jonathan M Davis
On 2011-06-08 14:30, David Nadlinger wrote: On 6/8/11 11:14 PM, Jonathan M Davis wrote: On 2011-06-08 13:36, David Nadlinger wrote: Did I miss a way to convert a TickDuration to a Duration? If there really is none, is there a reason for this? Having to do an immediate conversion to a