Skip to content

Instantly share code, notes, and snippets.

View brikis98's full-sized avatar

Yevgeniy Brikman brikis98

View GitHub Profile
import play.api._
import play.api.mvc._
object Global extends GlobalSettings {
def ResponseTime[A](action: Action[A]): Action[A] = Action(action.parser) { request =>
val start = System.currentTimeMillis
val result = action(request)
println( request + " -> " + (System.currentTimeMillis - start) + " ms.")
result
@brikis98
brikis98 / hello.js
Created February 11, 2012 01:04 — forked from jakobo/increment.js
var getName = require('name').getName;
exports.hello = function() {
return "Hello " + getName();
};