from flask import Flask, render_template, requestfrom uwsgidecorators import *import time@rbtimer(5)def five_seconds(num): print("The time is now " + str(time.time()))app = Flask(__name__)...if __name__ == "__main__": app.run(host='127.0.0.1:5000', debug=True)
log输出如下:
The time is now 1321993746.11
The time is now 1321993751.31 The time is now 1321993756.51 The time is now 1321993761.71