You can use the
StopWatch
class.
http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx[
^]
Edit, having no idea what the in's or out's of Aspect are, but have had a brief look at one of the presentations, then based on this extract:
%aspect Politeness
public class Politeness
{
%modules
public static SayHello ()
{
System.Console.WriteLine("Hello");
}
public static SayBye ()
{
System.Console.WriteLine("Bye");
}
%rules
%before %call *
%action public static void SayHelloAction
{ Politeness.SayHello()}
%after %call *
%action public static void SayByeAction { Politeness.SayBye()}
You would need to apply some function to the before and after section of the rules. As this seems to be coursework, I suggest you refer to your notes/course books. Any more than this and i would be probably giving you the answer, which of course would be cheating. (And I'm not looking up any more on the inner workings of Aspect!)
:)