Below code is not working in torch.jit.script
    def forward(self, x):
        start = time.time() * 1000
        y = self.compute_conv1d((x))
        print("cost %d ms" % (time.time() * 1000 - start))
        return y

error
RuntimeError: 
Python builtin <built-in function time> is currently not supported in Torchscript:

Since time.time() is not supported in Torchscript, is there any way to measure each module’s cost inside script model? I’m running on a cpu machine.
Thanks