long startTime = System.currentTimeMillis()

// Do what you need

long elapsedMillis = System.currentTimeMillis() - startTime;

Then use ^^^^

2016-09-19 10:34 GMT+02:00 Denis Kot <[email protected]>:

> I would like to send message from pipeline to hipchat contains total build
> time, i.e.:
> job-pipeline #3007 SUCCESSFUL after 1 min 42 sec
> How can I implement it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/e2cfa64b-e613-4f8b-87fa-7566de88e9f8%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/e2cfa64b-e613-4f8b-87fa-7566de88e9f8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4p51PJOoQLrWSjERApSCvNb9PQe34Fv84quyiPfiNaDw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to