Closed system, gas change in time

I'm trying to find out how to determine how a pressure of gas changes in time, but I can't find a way.

I have a system with constant volume $V$ (closed system, exchanges heat with environment through walls), the system is heated to temperature $T_0$ and then left to cool down on its own (heat source is removed after reaching $T_0$) until steady temperature $T_1$ is reached.

Is a way to determine the time dependent function for change in gas pressure inside the system (for example gas in some container)?

Assuming an ideal gas is okay.

At first I thought maybe differentiating $pV = nRT$ as $dp/dt = nR/V * dT/dt$, but I don't know where to go next.

Then I thought that maybe finding how heat is transferred through the walls to the environment and through the gas and using that to find $dT/dt$ (and eventually $dp/dt$) but I don't know how to go about approaching the problem that way.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9694199,"math_prob":0.9332053,"size":891,"snap":"2019-43-2019-47","text_gpt3_token_len":217,"char_repetition_ratio":0.09921082,"word_repetition_ratio":0.0,"special_character_ratio":0.2379349,"punctuation_ratio":0.057803467,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98015577,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-21T13:12:41Z\",\"WARC-Record-ID\":\"<urn:uuid:1524081a-e59c-4777-ad4c-02ea8ed8a1b9>\",\"Content-Length\":\"135667\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:32f90d9c-e105-4e28-ba26-dbd0eda4f9c0>\",\"WARC-Concurrent-To\":\"<urn:uuid:6b251701-8b88-4ffe-895a-9304c1ea7da0>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://physics.stackexchange.com/questions/158128/closed-system-gas-change-in-time\",\"WARC-Payload-Digest\":\"sha1:5KP3LVAUMCPNPJGU7TJDI3732G6KY5NB\",\"WARC-Block-Digest\":\"sha1:M7YZJBZSVDXSYG7ODYQFBN5ANQKAOGYM\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570987773711.75_warc_CC-MAIN-20191021120639-20191021144139-00043.warc.gz\"}"}