Re: determining type a pointer points to.

2009-08-23 Thread Stewart Gordon
Jarrett Billingsley wrote: On Sat, Aug 22, 2009 at 6:55 PM, Stewart Gordon wrote: typeof(*p) If p is int[], that gets you int instead of an error. I have no idea why. For everyone's benefit, the bug report is: http://d.puremagic.com/issues/show_bug.cgi?id=1381 Stewart.

Re: What time is it?

2009-08-23 Thread Chad J
Max wrote: > Is there any way in Phobos to measure the current time with microsecond > accuracy? > > Max Might I suggest std.perf? I found it here some years ago: http://www.digitalmars.com/techtips/timing_code.html It even seems to have survived the transition from D1 to D2. Oddly enough, th

Re: What time is it?

2009-08-23 Thread BCS
Reply to Benjamin, Reply to Max, Is there any way in Phobos to measure the current time with microsecond accuracy? Max "TicksPerSecond Will be at least 1000" getUTCtime() http://digitalmars.com/d/1.0/phobos/std_date.html who made mili and micro so darn alike? IIRC you can use C's stuf

Re: What time is it?

2009-08-23 Thread BCS
Reply to Max, Is there any way in Phobos to measure the current time with microsecond accuracy? Max "TicksPerSecond Will be at least 1000" getUTCtime() http://digitalmars.com/d/1.0/phobos/std_date.html

Re: Template mixins: Why is the decision to mixin made at the call site?

2009-08-23 Thread Chad J
Bill Baxter wrote: > On Fri, Aug 21, 2009 at 10:36 AM, div0 wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Not sure what the original choice was based on, but what you suggest >> looks wrong to me. You aren't necessarily using a template in order to >> mix it in somewhere. >> >> W

What time is it?

2009-08-23 Thread Max
Is there any way in Phobos to measure the current time with microsecond accuracy? Max

Re: determining type a pointer points to.

2009-08-23 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jarrett Billingsley wrote: > On Sat, Aug 22, 2009 at 5:58 PM, div0 wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Is there a function to do this? >> I Didn't find anything in traits or std.traits >> >> ty > > template PtrElemType(T :