Effect of solar and galactic cosmic rays on the duration of macrosynoptic processes