Author Topic: New Blog Post: Let’s Make a Macro Part 2: Adding Debug Timing  (Read 15751 times)

jjones

  • Guest
Let’s Make a Macro Part 2: Adding Debug Timing
http://blog.slickedit.com/2010/05/let%E2%80%99s-make-a-macro-part-2-adding-debug-timing/


In Part 1, we went over how to create a macro from scratch, load it and bind it to a key.  We also went over some basic macro functionality like inserting a new line of text and determining which language we are working in.  I thought it would be useful to stick with the theme of writing a macro that could insert some useful code.  In this blog, we’ll write a macro that surrounds the currently selected block of code with some simple code that reports how long the block takes to execute.  It’s sort of a poor-man’s performance tuning, and everyone needs to do it from time to time when they need to determine how long various sections of code take to execute, but don’t want to instrument the whole code base.

Continue reading Let’s Make a Macro Part 2: Adding Debug Timing here: http://blog.slickedit.com/2010/05/let%E2%80%99s-make-a-macro-part-2-adding-debug-timing/