GetFormattedTimestamp() public method

public GetFormattedTimestamp ( ) : string
return string
コード例 #1
0
        public override void OnCreate()
        {
            base.OnCreate();
            Log.Info(TAG, "OnCreate: the service is initializing.");

            timestamper = new UtcTimestamper();
            handler     = new Handler();

            // This Action is only for demonstration purposes.
            runnable = new Action(() =>
            {
                if (timestamper != null)
                {
                    Log.Debug(TAG, timestamper.GetFormattedTimestamp());
                    handler.PostDelayed(runnable, DELAY_BETWEEN_LOG_MESSAGES);
                }
            });
        }
コード例 #2
0
		public override void OnCreate()
		{
			base.OnCreate();
			Log.Info(TAG, "OnCreate: the service is initializing.");

			timestamper = new UtcTimestamper();
			handler = new Handler();

			// This Action is only for demonstration purposes.
			runnable = new Action(() =>
							{
								if (timestamper != null)
								{
									Log.Debug(TAG, timestamper.GetFormattedTimestamp());
									handler.PostDelayed(runnable, DELAY_BETWEEN_LOG_MESSAGES);
								}
							});
		}
コード例 #3
0
 /// <summary>
 /// This method will return a formatted timestamp to the client.
 /// </summary>
 /// <returns>A string that details what time the service started and how long it has been running.</returns>
 string GetFormattedTimestamp()
 {
     return(timestamper?.GetFormattedTimestamp());
 }