Code example for ContextWrapper

Methods: getSharedPreferences

0
		return "Munin"; 
	} 
 
	@Override 
	public Void run(Handler handler) {
        final SharedPreferences settings = context.getSharedPreferences("Munin_Node", 0);
        Long start = settings.getLong("start_time", 0);
        Long end = settings.getLong("end_time", 0);
        final Editor editor = settings.edit();
        editor.putLong("start_time", settings.getLong("new_start_time", 0));
        editor.commit();
        Long processing_time = end-start;
		StringBuffer output = new StringBuffer();
		output.append("graph_title Munin Processing Time\n");
		output.append("graph_vlabel ms\n");
		output.append("graph_info This graph shows how much time is spent running the munin service, its data is delayed by one run.\n");
		output.append("graph_category munin\n");
		output.append("graph_scale no\n");
		output.append("time.label Service\n");
		output.append("time.draw LINE\n");
		output.append("time.info Time Spent running the munin service\n");