Code example for Chronometer

Methods: getBase, stop

0
				// ArrayList<ArrayList<Object>> l = dbm.getAllRowsAsArrays(); 
				// Log.i("====before insert===", "count=" + l.size()); 
 
				// dbm.addRow(targetName, "nothing"); 
 
				crono.stop();
 
				long elapsedMillis = SystemClock.elapsedRealtime()
						- crono.getBase();
 
				// db op 
				ContentValues cv = new ContentValues();
				cv.put("name", targetName);
				cv.put("lasting", 50);
				cv.put("created", 12313);
				db.insert(TABLENAME, null, cv);
 
				Intent intent = new Intent();
				intent.putExtra("msg", elapsedMillis);
				setResult(Activity.RESULT_OK, intent);
				finish();