Marco Leise Wrote:
> 
> void main(string[] args)
> {
>      if (!enforce(args.length == 3, {
>          stderr.writefln("%s SOURCE DEST", args[0]);
>      })) return;
> 
>      auto sw = StopWatch();
>      sw.start();
> 
>      auto src = new MmFile(args[1], MmFile.Mode.Read, 0, null, 0);
>      auto dst = new MmFile(args[2], MmFile.Mode.ReadWriteNew, src.length,  
> null, src.length);
>      auto data = dst[];
>      data[] = src[];
>      dst.flush();
> 
>      sw.stop();
>      writefln("Copied %s bytes in %s msec (%s kB/s)", src.length,  
> sw.peek().msecs,
>              1_000_000 * src.length / (1024 * sw.peek().usecs));
> }
> 
> - Marco

Looking at this code, should be StopWatch.peek() defined as property?

Reply via email to