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
Forum Updated to NodeBB v4.3 + New Features

Print build time

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 3.4k Views 1 Watching
  • 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 4 Mar 2012, 14:04 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 4 Mar 2012, 16:58 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 8 Mar 2012, 11:49 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

        1/3

        4 Mar 2012, 14:04

        • Login

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