title: AttributeError: module 'time' has no attribute 'clock'
body: <p>This is my code:</p>
  
  <pre><code>from example1 import db, Puppy
  
  db.create_all()
  
  sam = Puppy('Sammy', 3)
  frank = Puppy ('Frankie',2)
  
  print (sam.id)
  print (frank.id)
  
  db.session.add_all([sam,frank])
  
  db.session.commit()
  
  print(sam.id)
  print(frank.id)
  </code></pre>
  
  <p>And this is my error:</p>
  
  <pre><code>&amp; C:/Python/Python38/python.exe r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py
  Traceback (most recent call last):
    File "r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py", line 1, in &lt;module&gt;
      from example1 import db, Puppy
    File "r:\dinabelajar\Flask-Bootcamp-master\05-Databases\coba\example1.py", line 3, in &lt;module&gt;
      from flask_sqlalchemy import SQLAlchemy
    File "C:\Python\Python38\lib\site-packages\flask_sqlalchemy\__init__.py", line 22, in &lt;module&gt;
      import sqlalchemy
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 9, in &lt;module&gt;
      from .sql import (
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in &lt;module&gt;
      from .expression import (
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in &lt;module&gt;
      from .visitors import Visitable
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in &lt;module&gt;
      from .. import util
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in &lt;module&gt;
      from .compat import callable, cmp, reduce,  \
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 172, in &lt;module&gt;
      time_func = time.clock
  AttributeError: module 'time' has no attribute 'clock'
  PS R:\dinabelajar\Flask-Bootcamp-master&gt; &amp; C:/Python/Python38/python.exe r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py
  Traceback (most recent call last):
    File "r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py", line 1, in &lt;module&gt;
      from example1 import db, Puppy
    File "r:\dinabelajar\Flask-Bootcamp-master\05-Databases\coba\example1.py", line 3, in &lt;module&gt;
      from flask_sqlalchemy import SQLAlchemy
    File "C:\Python\Python38\lib\site-packages\flask_sqlalchemy\__init__.py", line 22, in &lt;module&gt;
      import sqlalchemy
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 9, in &lt;module&gt;
      from .sql import (
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in &lt;module&gt;
      from .expression import (
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in &lt;module&gt;
      from .visitors import Visitable
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in &lt;module&gt;
      from .. import util
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in &lt;module&gt;
      from .compat import callable, cmp, reduce,  \
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 172, in &lt;module&gt;
      time_func = time.clock
  AttributeError: module 'time' has no attribute 'clock'
  PS R:\dinabelajar\Flask-Bootcamp-master&gt; &amp; C:/Python/Python38/python.exe r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py
  Traceback (most recent call last):
    File "r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py", line 1, in &lt;module&gt;
      from example1 import db, Puppy
    File "r:\dinabelajar\Flask-Bootcamp-master\05-Databases\coba\example1.py", line 3, in &lt;module&gt;
      from flask_sqlalchemy import SQLAlchemy
    File "C:\Python\Python38\lib\site-packages\flask_sqlalchemy\__init__.py", line 22, in &lt;module&gt;
      import sqlalchemy
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 9, in &lt;module&gt;
      from .sql import (
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in &lt;module&gt;
      from .expression import (
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in &lt;module&gt;
      from .visitors import Visitable
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in &lt;module&gt;
      from .. import util
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in &lt;module&gt;
      from .compat import callable, cmp, reduce,  \
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 172, in &lt;module&gt;
      time_func = time.clock
  AttributeError: module 'time' has no attribute 'clock'
  PS R:\dinabelajar\Flask-Bootcamp-master&gt; &amp; C:/Python/Python38/python.exe r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py
  Traceback (most recent call last):
    File "r:/dinabelajar/Flask-Bootcamp-master/05-Databases/coba/setdatabase.py", line 1, in &lt;module&gt;
      from example1 import db, Puppy
    File "r:\dinabelajar\Flask-Bootcamp-master\05-Databases\coba\example1.py", line 3, in &lt;module&gt;
      from flask_sqlalchemy import SQLAlchemy
    File "C:\Python\Python38\lib\site-packages\flask_sqlalchemy\__init__.py", line 22, in &lt;module&gt;
      import sqlalchemy
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 9, in &lt;module&gt;
      from .sql import (
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in &lt;module&gt;
      from .expression import (
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in &lt;module&gt;
      from .visitors import Visitable
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in &lt;module&gt;
      from .. import util
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in &lt;module&gt;
      from .compat import callable, cmp, reduce,  \
    File "C:\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 172, in &lt;module&gt;
      time_func = time.clock
  AttributeError: module 'time' has no attribute 'clock'
  </code></pre>
  
  <p>How can i fix this?</p>