jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Boo
  • Boo
  • BOO-170

Timer macro

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 0.4
  • Fix Version/s: None
  • Component/s: Compiler
  • Labels:
    None
  • Number of attachments :
    2

Description

A macro for timing a block of code. Could it be added to standard distribution?

// sets "elapsed" to elapsed time
timer elapsed:
pass
Output:
_startTime1_ = System.DateTime.get_Now()
elapsed = System.DateTime.op_Subtraction(System.DateTime.get_Now(), _startTime1_)

// prints "Elapsed time: ${__elapsedTime

{0}

__}"
timer:
pass

Output:
_startTime2_ = System.DateTime.get_Now()
_elapsedTime2_ = System.DateTime.op_Subtraction(System.DateTime.get_Now(), _startTime2_)
System.Console.Write('Elapsed time: ')
System.Console.WriteLine(_elapsedTime2_)

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    TimeItMacro.patch
    29/May/05 9:41 AM
    12 kB
    Sorin Ionescu
  2. File
    TimerMacro.cs
    11/Dec/04 5:15 PM
    7 kB
    Bill Wood

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity

People

  • Assignee:
    Unassigned
    Reporter:
    Bill Wood
Vote (0)
Watch (1)

Dates

  • Created:
    31/Oct/04 3:51 PM
    Updated:
    03/Nov/05 9:10 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.