[GIS] Displaying measurement of current segment in Measurement Widget of ArcGIS API for JavaScript

arcgis-javascript-apiarcgis-server

In this ESRI measurement widget sample:
https://developers.arcgis.com/javascript/jssamples/widget_measurement.html
when you draw a line, it dynamically displays the segment length. And, when you measure subsequent segments lengths, it add it to the previous length.

How can I add another result which dynamically shows the current segment length?