python -m pip install --user virtualenv
cd to install location path of env
python -m virtualenv env
source env/bin/activate
python -m pip install --user virtualenv
cd to install location path of env
python -m virtualenv env
source env/bin/activate
gflags is not compiled as a shared library by default; make sure it is compiled as a shared library:
cd gflags/build
cmake .. -DBUILD_SHARED_LIBS=ON
make -j32
sudo make -j32 install
glog compiles fine against gflags.
import time
while True:
start_time = time.time() # start time of the loop
########################
# your fancy code here #
########################
print("FPS: ", 1.0 / (time.time() - start_time)) # FPS = 1 / time to process loop
import time
start_time = time.time()
x = 1 # displays the frame rate every 1 second
counter = 0
while True:
########################
# your fancy code here #
########################
counter+=1
if (time.time() - start_time) > x :
print("FPS: ", counter / (time.time() - start_time))
counter = 0
start_time = time.time()