question: public double canUse ( GadgetType gadget ) { Object count = gadgetCooldowns . get ( gadget ) ; if ( count == null || System . currentTimeMillis ( ) > ( long ) count ) { return - 1 ; } double valueMillis = ( long ) count - System . currentTimeMillis ( ) ; return valueMillis / 1000d ; }
target:  Checks if a player can use a given gadget type.