Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; public class Main { public static void saveStartTime(Context paramContext) { SharedPreferences time = paramContext .getSharedPreferences("mobclick_agent_" + paramContext.getPackageName(), 0); Editor editor = time.edit().putLong("start_millis", System.currentTimeMillis()); editor.commit(); } }