Code example for Time

Methods: formatsetToNow

    // 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();
        sImageName = now.format("%Y-%m-%d %H.%M.%S") + ".jpg";
        return sImageName;
Connect your IDE to all the code out there  Get Codota for Java