I saw the same problem. Similar discussion can be found:
I tested a similar fix and was able to get the kernel module built and
running. My fix attached.
** Attachment added: "fix-for-4.15-timer-change"
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to nvidia-graphics-drivers-304 in Ubuntu.
nvidia-304 kernel module failed to build with new bionic kernel
[error: implicit declaration of function ‘init_timer’; did you mean
To manage notifications about this bug go to:
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help : https://help.launchpad.net/ListHelp