Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Print build time
QtWS25 Last Chance

Print build time

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 3.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hostel
    wrote on last edited by
    #1

    Is there any method to print a build time? I see that Qt Creator or qmake prints a message when make starts and stops. I want to print at the end of the build difference between them.

    Example of Compile Output:
    @
    15:02:05: Running build steps for project untitled...
    15:02:06: Starting: "/usr/bin/qmake-qt4" /tmp/untitled/untitled.pro -r -spec linux-g++
    15:02:06: The process "/usr/bin/qmake-qt4" exited normally.
    15:02:06: Starting: "/usr/bin/make" -w
    make: Entering directory /tmp/untitled-build-desktop-Qt_4_7_4_w_PATH__System__Release' g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I../untitled -I/usr/include/QtCore -I/usr/include -I. -I../untitled -I. -o main.o ../untitled/main.cpp g++ -Wl,-O1 -o untitled main.o -L/usr/lib64 -lQtCore -lpthread make: Leaving directory /tmp/untitled-build-desktop-Qt_4_7_4_w_PATH__System__Release'
    15:02:06: The process "/usr/bin/make" exited normally.

    // here I want to print differences between the times
    @

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Qt Creator adds those time stamps.

      A good way to get the desired time difference on linux/mac is to just add "time" in front of the call: It will measure different time values (cpu time, wallclock time) and print it once the application is done.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hostel
        wrote on last edited by
        #3

        Thanks, I forget about time, but this works outside Qt Creator. There is a another solution, which will work inside Qt Creator?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved