Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.codahale.metrics.annotation;
An annotation for marking a method of an annotated object as timed.

Given a method like this:

     \@Timed(name = "fancyName")
     public String fancyName(String name) {
         return "Sir Captain " + name;

A timer for the defining class with the name fancyName will be created and each time the #fancyName(String) method is invoked, the method's execution will be timed.

public @interface Timed {
The name of the timer.
    String name() default "";

If true, use the given name an as absolute name. If false, use the given name relative to the annotated class.
    boolean absolute() default false;
New to GrepCode? Check out our FAQ X