SavedVariables are only saved to harddisc if you do a UI reload ('/script ReloadUI()'), log out or exit the game via ingame interface. There is no other way to save securely SavedVariables.
The SavedVariables are automatically saved as long as you have '## SavedVariables: blabla' or '## SavedVariablesPerCharacter: blabla' in your toc. Simply change the blabla variable in your code and it will be saved at UIreload/logout/exit.
Btw: use a better name (something like MyAddon_Options or MyAddonDB instead of currentTotal. blabla is global variable)...