title: How to create a chronometer in a notification Android?
body: <p>I have the following method below:</p>
  
  <pre><code>public NotificationCompat.Builder createNotification(Context context) {
      Intent intent = new Intent(this, MapsActivity.class);
      PendingIntent pIntent = PendingIntent.getActivity(this, (int) System.currentTimeMillis(), intent, 0);
  
      NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
      boolean running = true;
      builder = new NotificationCompat.Builder(context)
              .setContentText("conteúdo")
              .setContentTitle("titulo")
              .setSmallIcon(R.drawable.ic_today_black_24dp)
              .setAutoCancel(false)
              .setOnlyAlertOnce(true)
              .setOngoing(running)
              .setContentIntent(
                      PendingIntent.getActivity(context, 10,
                              new Intent(context, MapsActivity.class)
                                      .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP),
                              0)
              )
              .addAction(running ? R.drawable.ic_stop_black_24dp
                              : R.drawable.ic_play_arrow_black_24dp,
                      running ? "Pause"
                              : "play",
                      pIntent)
              .addAction(R.drawable.ic_stop_black_24dp, "Stop",
                      pIntent);
  
      notificationManager.notify(0, builder.build());
  
      return builder;
  }
  </code></pre>
  
  <p>In which launched a notification in the status bar, as shown below in the first notification:</p>
  
  <p><a href="https://i.stack.imgur.com/MBDTu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MBDTu.png" alt="enter image description here"></a></p>
  
  <p>To link the notification I do this:</p>
  
  <pre><code>NotificationCompat.Builder notification = createNotification(this);
  NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
  mNotificationManager.notify(0, notification.build());
  </code></pre>
  
  <p>I would like to create a Chronometer in a notification, exactly as it appears in the Strava notification (second notification of the image), as shown above.</p>
  
  <p>How to create a <code>Chronometer</code> in a notification?</p>