Code example for Time

Methods: format, setToNow

0
    // this code is really hacky and doesn't belong anywhere so I'm putting it here for now 
    // until I can come up with a better solution. 
 
    private static String sImageName = "";
 
    static String generateImageName() {
        Time now = new Time();
        now.setToNow();
        sImageName = now.format("%Y-%m-%d %H.%M.%S") + ".jpg";
        return sImageName;
    } 
}